Skip to content

Commit 419a639

Browse files
committed
update test
1 parent ed76e52 commit 419a639

File tree

2 files changed

+43
-35
lines changed

2 files changed

+43
-35
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function Test-VirtualMachineList
194194

195195
if ($s2 -ne $null)
196196
{
197-
Assert-NotNull $s2[0].ResourceGroupName;
197+
Assert-NotNull $s2[0].Id;
198198
}
199199

200200
Assert-ThrowsContains { $s3 = Get-AzureVM -NextLink "http://www.test.com/test"; } "Unexpected character"

src/ResourceManager/Compute/Commands.Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests/TestVirtualMachineList.json

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"RequestBody": "",
88
"RequestHeaders": {
99
"User-Agent": [
10-
"Microsoft.Azure.Management.Compute.ComputeManagementClient/3.0.0.0"
10+
"Microsoft.Azure.Management.Compute.ComputeManagementClient/5.0.0.0"
1111
]
1212
},
13-
"ResponseBody": "{\r\n \"value\": []\r\n}",
13+
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\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.0.201502\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"osDisk\",\r\n \"createOption\": \"FromImage\",\r\n \"vhd\": {\r\n \"uri\": \"https://stohpftestrgname9999.blob.core.windows.net/test/os.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\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\": true\r\n },\r\n \"secrets\": []\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/hpftestrgname9999/providers/Microsoft.Network/networkInterfaces/nichpftestrgname9999\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"Failed\"\r\n },\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/HPFTESTRGNAME9999/providers/Microsoft.Compute/virtualMachines/vmhpftestrgname9999\",\r\n \"name\": \"vmhpftestrgname9999\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastasia\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"properties\": {\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.0.201502\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"osDisk\",\r\n \"createOption\": \"FromImage\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg5998.blob.core.windows.net/test/os.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\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\": true\r\n },\r\n \"secrets\": []\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/pstestrg5998/providers/Microsoft.Network/networkInterfaces/nicpstestrg5998\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/PSTESTRG5998/providers/Microsoft.Compute/virtualMachines/vmpstestrg5998\",\r\n \"name\": \"vmpstestrg5998\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastasia\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}",
1414
"ResponseHeaders": {
1515
"Content-Length": [
16-
"12"
16+
"3085"
1717
],
1818
"Content-Type": [
1919
"application/json; charset=utf-8"
@@ -24,26 +24,30 @@
2424
"Pragma": [
2525
"no-cache"
2626
],
27-
"x-ms-ratelimit-remaining-subscription-reads": [
28-
"31999"
27+
"Strict-Transport-Security": [
28+
"max-age=31536000; includeSubDomains"
2929
],
3030
"x-ms-request-id": [
31-
"7fccdb8b-bdfa-4578-930a-d4248b1bf4ba"
31+
"541db794-174c-4034-8c9a-6a9ea5a051f8"
3232
],
33-
"x-ms-correlation-request-id": [
34-
"7fccdb8b-bdfa-4578-930a-d4248b1bf4ba"
33+
"Cache-Control": [
34+
"no-cache"
3535
],
36-
"x-ms-routing-request-id": [
37-
"WESTUS:20150418T013602Z:7fccdb8b-bdfa-4578-930a-d4248b1bf4ba"
36+
"Server": [
37+
"Microsoft-HTTPAPI/2.0",
38+
"Microsoft-HTTPAPI/2.0"
3839
],
39-
"Strict-Transport-Security": [
40-
"max-age=31536000; includeSubDomains"
40+
"x-ms-ratelimit-remaining-subscription-reads": [
41+
"31987"
4142
],
42-
"Cache-Control": [
43-
"no-cache"
43+
"x-ms-correlation-request-id": [
44+
"f3e1afd3-cd9b-471a-98e5-ff892a549dc7"
45+
],
46+
"x-ms-routing-request-id": [
47+
"WESTUS:20150426T232355Z:f3e1afd3-cd9b-471a-98e5-ff892a549dc7"
4448
],
4549
"Date": [
46-
"Sat, 18 Apr 2015 01:36:01 GMT"
50+
"Sun, 26 Apr 2015 23:23:55 GMT"
4751
]
4852
},
4953
"StatusCode": 200
@@ -55,13 +59,13 @@
5559
"RequestBody": "",
5660
"RequestHeaders": {
5761
"User-Agent": [
58-
"Microsoft.Azure.Management.Compute.ComputeManagementClient/3.0.0.0"
62+
"Microsoft.Azure.Management.Compute.ComputeManagementClient/5.0.0.0"
5963
]
6064
},
61-
"ResponseBody": "{\r\n \"value\": []\r\n}",
65+
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\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.0.201502\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"osDisk\",\r\n \"createOption\": \"FromImage\",\r\n \"vhd\": {\r\n \"uri\": \"https://stohpftestrgname9999.blob.core.windows.net/test/os.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\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\": true\r\n },\r\n \"secrets\": []\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/hpftestrgname9999/providers/Microsoft.Network/networkInterfaces/nichpftestrgname9999\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"Failed\"\r\n },\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/HPFTESTRGNAME9999/providers/Microsoft.Compute/virtualMachines/vmhpftestrgname9999\",\r\n \"name\": \"vmhpftestrgname9999\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastasia\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"properties\": {\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.0.201502\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"osDisk\",\r\n \"createOption\": \"FromImage\",\r\n \"vhd\": {\r\n \"uri\": \"https://stopstestrg5998.blob.core.windows.net/test/os.vhd\"\r\n },\r\n \"caching\": \"ReadWrite\"\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\": true\r\n },\r\n \"secrets\": []\r\n },\r\n \"networkProfile\": {\r\n \"networkInterfaces\": [\r\n {\r\n \"properties\": {},\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/pstestrg5998/providers/Microsoft.Network/networkInterfaces/nicpstestrg5998\"\r\n }\r\n ]\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/015b5c33-7725-4fc2-9c81-c9b07de44668/resourceGroups/PSTESTRG5998/providers/Microsoft.Compute/virtualMachines/vmpstestrg5998\",\r\n \"name\": \"vmpstestrg5998\",\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastasia\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}",
6266
"ResponseHeaders": {
6367
"Content-Length": [
64-
"12"
68+
"3085"
6569
],
6670
"Content-Type": [
6771
"application/json; charset=utf-8"
@@ -72,26 +76,30 @@
7276
"Pragma": [
7377
"no-cache"
7478
],
75-
"x-ms-ratelimit-remaining-subscription-reads": [
76-
"31998"
79+
"Strict-Transport-Security": [
80+
"max-age=31536000; includeSubDomains"
7781
],
7882
"x-ms-request-id": [
79-
"4acb4a5c-6f97-4b33-bb4d-6902992f3348"
83+
"f88b6473-8c69-477f-bf0b-10b9a3ae84b8"
8084
],
81-
"x-ms-correlation-request-id": [
82-
"4acb4a5c-6f97-4b33-bb4d-6902992f3348"
85+
"Cache-Control": [
86+
"no-cache"
8387
],
84-
"x-ms-routing-request-id": [
85-
"WESTUS:20150418T013602Z:4acb4a5c-6f97-4b33-bb4d-6902992f3348"
88+
"Server": [
89+
"Microsoft-HTTPAPI/2.0",
90+
"Microsoft-HTTPAPI/2.0"
8691
],
87-
"Strict-Transport-Security": [
88-
"max-age=31536000; includeSubDomains"
92+
"x-ms-ratelimit-remaining-subscription-reads": [
93+
"31986"
8994
],
90-
"Cache-Control": [
91-
"no-cache"
95+
"x-ms-correlation-request-id": [
96+
"717508ff-fd71-492a-bb1a-38c22e3b9e65"
97+
],
98+
"x-ms-routing-request-id": [
99+
"WESTUS:20150426T232355Z:717508ff-fd71-492a-bb1a-38c22e3b9e65"
92100
],
93101
"Date": [
94-
"Sat, 18 Apr 2015 01:36:01 GMT"
102+
"Sun, 26 Apr 2015 23:23:55 GMT"
95103
]
96104
},
97105
"StatusCode": 200
@@ -103,10 +111,10 @@
103111
"RequestBody": "",
104112
"RequestHeaders": {
105113
"User-Agent": [
106-
"Microsoft.Azure.Management.Compute.ComputeManagementClient/3.0.0.0"
114+
"Microsoft.Azure.Management.Compute.ComputeManagementClient/5.0.0.0"
107115
]
108116
},
109-
"ResponseBody": "<html>\r\n <body onload=\"challenge();\">\r\n <script>eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('g l(){a.j=\\'7=n; h-5=e; i=/\\';c.k.1()};o 6(){3.m=\\'f=0; d-9=8; p=/\\';b.4.2()}',26,26,'1ddae90d1314569990e496307402856b6b3f02b6|reload|reload|document|location|age|challenge|SENGINX-ROBOT-MITIGATION |600 |age|document|window|window|max|600 |SENGINX-ROBOT-MITIGATION |function|max|path|cookie|location|challenge_f|cookie|418b499229a73d216cac9b2277427f69eeb7fa7d|function|path'.split('|'),0,{}))</script>\r\n </body>\r\n</html>",
117+
"ResponseBody": "<html>\r\n <body onload=\"challenge();\">\r\n <script>eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('f j(){k.1=\\'c=b; m-p=a; n=/\\';9.7.i()};0 8(){6.2=\\'4=5; h-e=d; 3=/\\';g.l.o()}',26,26,'function|cookie|cookie|path|SENGINX-ROBOT-MITIGATION |54374c150f67dd56f6e4ef82ad6351702d0c83f9|document|location|challenge|window|600 |dab3f116dc17f9325fde8592bf72432301807c41|SENGINX-ROBOT-MITIGATION |600 |age|function|window|max|reload|challenge_f|document|location|max|path|reload|age'.split('|'),0,{}))</script>\r\n </body>\r\n</html>",
110118
"ResponseHeaders": {
111119
"Content-Length": [
112120
"732"
@@ -121,7 +129,7 @@
121129
"no-store, no-cache"
122130
],
123131
"Date": [
124-
"Sat, 18 Apr 2015 01:40:53 GMT"
132+
"Sun, 26 Apr 2015 23:29:06 GMT"
125133
],
126134
"Server": [
127135
"BlockDos.net"
@@ -136,4 +144,4 @@
136144
"TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
137145
"Domain": "microsoft.com"
138146
}
139-
}
147+
}

0 commit comments

Comments
 (0)