Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ msbuild.log
# please do not commit any app.config files.
app.config
!src/ResourceManager/Profile/Commands.Profile.Test/App.config
!src/ResourceManager/Resources/Commands.Resources.Test/App.config
!src/ResourceManager/Storage/Commands.Management.Storage.Test/App.config
!src/ResourceManager/ManagedServiceIdentity/Commands.ManagedServiceIdentity.Test/App.config
!src/Storage/Commands.Storage.Test/app.config

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dotnet: 2.1.200
dist: trusty

env:
- NAME="azure-powershell-core" CONFIG="Debug"
- NAME="azure-powershell-core" CONFIG="Debug" AZURE_TEST_MODE=Playback

services:
- docker
Expand Down
14 changes: 14 additions & 0 deletions src/Azure.PowerShell.Netcore.Test.sln
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.DeviceProvisioning
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.PolicyInsights.Test.Netcore", "ResourceManager\PolicyInsights\Commands.PolicyInsights.Test\Commands.PolicyInsights.Test.Netcore.csproj", "{AFA65D3A-FB7E-4DAB-9867-1CA4CBA41BFB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.TestFx.Netcore", "ResourceManager\Common\Commands.TestFx\Commands.TestFx.Netcore.csproj", "{BFACE421-52D9-4D41-BDE9-444A8A721330}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -405,6 +407,18 @@ Global
{AFA65D3A-FB7E-4DAB-9867-1CA4CBA41BFB}.Release|x64.Build.0 = Release|Any CPU
{AFA65D3A-FB7E-4DAB-9867-1CA4CBA41BFB}.Release|x86.ActiveCfg = Release|Any CPU
{AFA65D3A-FB7E-4DAB-9867-1CA4CBA41BFB}.Release|x86.Build.0 = Release|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Debug|x64.ActiveCfg = Debug|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Debug|x64.Build.0 = Debug|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Debug|x86.ActiveCfg = Debug|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Debug|x86.Build.0 = Debug|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Release|Any CPU.Build.0 = Release|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Release|x64.ActiveCfg = Release|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Release|x64.Build.0 = Release|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Release|x86.ActiveCfg = Release|Any CPU
{BFACE421-52D9-4D41-BDE9-444A8A721330}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,27 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.8.1\lib\net452\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.11\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.3.0\lib\net452\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework">
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.7.2\lib\net452\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.12\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down Expand Up @@ -90,6 +99,18 @@
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="SessionRecords\Microsoft.Azure.Commands.Common.Compute.Tests.Version2016_04_preview.ComputeManagementClientShould\ListDisks.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Common.Compute.Tests.Version2016_04_preview.ComputeManagementClientShould\ListVirtualMachine.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Common.Compute.Tests.Version2016_04_preview.ComputeManagementClientShould\ListVirtualMachineImagePublishers.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Common.Compute.Tests.Version2016_04_preview.ComputeManagementClientShould\ListVirtualMachineSizes.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\xunit.analyzers.0.7.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
Expand All @@ -102,11 +123,5 @@
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\xunit.core.2.3.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.3.1\build\xunit.core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Import Project="..\..\..\tools\Common.Dependencies.Test.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"Entries": [
{
"RequestUri": "/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/providers/Microsoft.Compute/disks?api-version=2016-04-30-preview",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzljYmQ5MjAtYzAwYy00MjdjLTg1MmItOGFhZjM4YmFkYWViL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS9kaXNrcz9hcGktdmVyc2lvbj0yMDE2LTA0LTMwLXByZXZpZXc=",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"a99916df-037b-48a0-9535-4ff28b5d5815"
],
"accept-language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.7.3110.0",
"OSName/Windows10Enterprise",
"OSVersion/6.3.17134",
"Microsoft.Azure.Commands.Common.Compute.Version2016_04_preview.ComputeManagementClient/1.0.0.0"
]
},
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"accountType\": \"Standard_LRS\",\r\n \"osType\": \"Windows\",\r\n \"creationData\": {\r\n \"createOption\": \"FromImage\",\r\n \"imageReference\": {\r\n \"id\": \"/Subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/Providers/Microsoft.Compute/Locations/eastus2/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2008-R2-SP1/Versions/2.127.20170628\"\r\n }\r\n },\r\n \"diskSizeGB\": 127,\r\n \"timeCreated\": \"2018-07-11T12:20:46.928697-07:00\",\r\n \"ownerId\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/crptestps7596/providers/Microsoft.Compute/virtualMachines/vmcrptestps7596\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Attached\"\r\n },\r\n \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus2\",\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/CRPTESTPS7596/providers/Microsoft.Compute/disks/vmcrptestps7596_OsDisk_1_978dd480e37c4bacb0d31416324bf793\",\r\n \"name\": \"vmcrptestps7596_OsDisk_1_978dd480e37c4bacb0d31416324bf793\"\r\n },\r\n {\r\n \"properties\": {\r\n \"accountType\": \"Premium_LRS\",\r\n \"osType\": \"Linux\",\r\n \"creationData\": {\r\n \"createOption\": \"FromImage\",\r\n \"imageReference\": {\r\n \"id\": \"/Subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/UbuntuServer/Skus/16.04-LTS/Versions/16.04.201807030\"\r\n }\r\n },\r\n \"diskSizeGB\": 30,\r\n \"timeCreated\": \"2018-07-11T11:30:39.3771097-07:00\",\r\n \"ownerId\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/tjp-rg/providers/Microsoft.Compute/virtualMachines/vm1\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Attached\"\r\n },\r\n \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/TJP-RG/providers/Microsoft.Compute/disks/vm1_OsDisk_1_59e4de3d8570465985cb158dc5fc5492\",\r\n \"name\": \"vm1_OsDisk_1_59e4de3d8570465985cb158dc5fc5492\"\r\n }\r\n ]\r\n}",
"ResponseHeaders": {
"Content-Length": [
"1803"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
],
"Pragma": [
"no-cache"
],
"x-ms-original-request-ids": [
"34f04a89-7957-4db4-b050-ed7bd92bd4d2",
"faa58b26-5fa4-4255-a9dc-854f4c4e86d6"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14999"
],
"x-ms-request-id": [
"32f6cbf6-80c3-4352-b0fd-02dffd2cb476"
],
"x-ms-correlation-request-id": [
"32f6cbf6-80c3-4352-b0fd-02dffd2cb476"
],
"x-ms-routing-request-id": [
"WESTUS2:20180711T192723Z:32f6cbf6-80c3-4352-b0fd-02dffd2cb476"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"X-Content-Type-Options": [
"nosniff"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Wed, 11 Jul 2018 19:27:22 GMT"
]
},
"StatusCode": 200
}
],
"Names": {},
"Variables": {
"SubscriptionId": "c9cbd920-c00c-427c-852b-8aaf38badaeb"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"Entries": [
{
"RequestUri": "/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/providers/Microsoft.Compute/virtualMachines?api-version=2016-04-30-preview",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzljYmQ5MjAtYzAwYy00MjdjLTg1MmItOGFhZjM4YmFkYWViL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZXM/YXBpLXZlcnNpb249MjAxNi0wNC0zMC1wcmV2aWV3",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
"96f4af86-d1b0-4a99-a6f5-0af7f54dc28b"
],
"accept-language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.7.3110.0",
"OSName/Windows10Enterprise",
"OSVersion/6.3.17134",
"Microsoft.Azure.Commands.Common.Compute.Version2016_04_preview.ComputeManagementClient/1.0.0.0"
]
},
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"vmId\": \"101b7f2e-e501-4de3-94f6-80d050b571c5\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_A4\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2008-R2-SP1\",\r\n \"version\": \"2.127.20170628\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"vmcrptestps7596_OsDisk_1_978dd480e37c4bacb0d31416324bf793\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/crptestps7596/providers/Microsoft.Compute/disks/vmcrptestps7596_OsDisk_1_978dd480e37c4bacb0d31416324bf793\"\r\n },\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"test\",\r\n \"adminUsername\": \"Foo12\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": false\r\n },\r\n \"secrets\": []\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/crptestps7596/providers/Microsoft.Network/networkInterfaces/niccrptestps7596\",\r\n \"properties\": {\r\n \"primary\": true\r\n }\r\n }\r\n ]\r\n },\r\n \"diagnosticsProfile\": {\r\n \"bootDiagnostics\": {\r\n \"enabled\": true,\r\n \"storageUri\": \"https://stocrptestps7596.blob.core.windows.net/\"\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"resources\": [\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/CRPTESTPS7596/providers/Microsoft.Compute/virtualMachines/vmcrptestps7596/extensions/BGInfo\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus2\",\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/CRPTESTPS7596/providers/Microsoft.Compute/virtualMachines/vmcrptestps7596\",\r\n \"name\": \"vmcrptestps7596\"\r\n },\r\n {\r\n \"properties\": {\r\n \"vmId\": \"445871d2-a782-41f4-bc1f-c25bd029924c\",\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": \"16.04-LTS\",\r\n \"version\": \"latest\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm1_OsDisk_1_59e4de3d8570465985cb158dc5fc5492\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\",\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/tjp-rg/providers/Microsoft.Compute/disks/vm1_OsDisk_1_59e4de3d8570465985cb158dc5fc5492\"\r\n },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm1\",\r\n \"adminUsername\": \"trpresco\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \"path\": \"/home/trpresco/.ssh/authorized_keys\",\r\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLkUy/BFb7o47gQqFcMiioYD4w3Tu/7bpy7t/3pQVhjmsEEaWk09dA1Ju1UbukKaLpOprch/r9bgUWu1oTEP7E5evwaJl0TvLX0gsxGGItfPc58bbQ77uxuXhMfYEZ6oiS+Ybt5nUjjDUUNhSIrKSLhCHCmQ9JnOd/AObf9G4iR38bsABIAVxmbYT6OQKm4oRwNs1c99B5TsfnREFs7yawCV3hjKVHsD3bRo83bBbBG3d/CHYfcnEbpK4weagw899YodAXDiUh0qYfOy0mGz4zWaQ4rcCitk9od/WSDhLAOy74cqwzKJwoR9DcALxkWVMuJW7xBF9tWEroVvFrh6/N\"\r\n }\r\n ]\r\n }\r\n },\r\n \"secrets\": []\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/tjp-rg/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/c9cbd920-c00c-427c-852b-8aaf38badaeb/resourceGroups/TJP-RG/providers/Microsoft.Compute/virtualMachines/vm1\",\r\n \"name\": \"vm1\"\r\n }\r\n ]\r\n}",
"ResponseHeaders": {
"Content-Length": [
"3252"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
],
"Pragma": [
"no-cache"
],
"x-ms-original-request-ids": [
"b0656306-378b-4782-bb7f-58957e8c94fb",
"7538a576-d3c7-4795-a506-eca731f4c0af"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14999"
],
"x-ms-request-id": [
"7a408ec4-7c80-4507-88e0-df04def5605c"
],
"x-ms-correlation-request-id": [
"7a408ec4-7c80-4507-88e0-df04def5605c"
],
"x-ms-routing-request-id": [
"WESTUS2:20180711T192729Z:7a408ec4-7c80-4507-88e0-df04def5605c"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"X-Content-Type-Options": [
"nosniff"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Wed, 11 Jul 2018 19:27:29 GMT"
]
},
"StatusCode": 200
}
],
"Names": {},
"Variables": {
"SubscriptionId": "c9cbd920-c00c-427c-852b-8aaf38badaeb"
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading