Skip to content

Commit 0b5d7ae

Browse files
authored
[compute] update test (Azure#23456)
* update compute * Update conftest.py * Update test_mgmt_compute.pyTestMgmtComputetest_compute_availability_sets.json update tenant_id * Update test_mgmt_compute.pyTestMgmtComputetest_compute_log_analytics.json update tenant_id * Update test_mgmt_compute.pyTestMgmtComputetest_compute_proximity_placement_groups.json update tenand_id * Update test_mgmt_compute_disks.pyTestMgmtComputeMultiVersiontest_compute_disks_multi.json update tenand_id * Update test_mgmt_compute_disks.pyTestMgmtComputetest_compute_disks.json update tenand_id * Update test_mgmt_compute_disks.pyTestMgmtComputetest_compute_shot.json update tenand_id * Update test_mgmt_compute_galleries.pyTestMgmtComputetest_compute_galleries.json update tenand_id * Update test_mgmt_compute_vm.pyTestMgmtComputetest_compute_vm.json update tenand_id * Update test_mgmt_compute_vm.pyTestMgmtComputetest_compute_vm_extension_image.json update tenand_id * Update test_mgmt_compute_vm.pyTestMgmtComputetest_compute_vm_image.json update tenand_id * Update test_mgmt_compute_vmss.pyTestMgmtComputetest_compute_vmss_perform_maintenance.json update tenand_id * Update test_mgmt_compute_vmss.pyTestMgmtComputetest_compute_vmss_vm.json update tenand_id * Update test_mgmt_compute_vmss.pyTestMgmtComputetest_compute_vmss_vm_2.json update tenand_id
1 parent de8da03 commit 0b5d7ae

14 files changed

+3763
-3804
lines changed

sdk/compute/azure-mgmt-compute/tests/conftest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from dotenv import load_dotenv
3232

3333
from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_body_key_sanitizer
34+
from devtools_testutils import add_header_regex_sanitizer, add_body_key_sanitizer
3435

3536
# Ignore async tests for Python < 3.5
3637
collect_ignore_glob = []
@@ -46,6 +47,6 @@ def add_sanitizers(test_proxy):
4647
tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
4748
add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000")
4849
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
49-
add_general_regex_sanitizer(regex='eyJ0eXAiOiJKV.*?"', value='access_token"')
50-
add_general_regex_sanitizer(regex='fpc=.*?;', value='fpc=fpc;')
51-
add_body_key_sanitizer(json_path="$..accessSAS")
50+
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
51+
add_header_regex_sanitizer(key="Cookie", value="cookie;")
52+
add_body_key_sanitizer(json_path="$..access_token", value="access_token")

sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.pyTestMgmtComputetest_compute_availability_sets.json

Lines changed: 50 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Accept": "*/*",
88
"Accept-Encoding": "gzip, deflate",
99
"Connection": "keep-alive",
10-
"User-Agent": "azsdk-python-identity/1.8.0b2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
10+
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
1111
},
1212
"RequestBody": null,
1313
"StatusCode": 200,
@@ -17,18 +17,13 @@
1717
"Cache-Control": "max-age=86400, private",
1818
"Content-Length": "1753",
1919
"Content-Type": "application/json; charset=utf-8",
20-
"Date": "Wed, 02 Mar 2022 03:01:18 GMT",
20+
"Date": "Wed, 09 Mar 2022 12:35:04 GMT",
2121
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
22-
"Set-Cookie": [
23-
"fpc=fpc; expires=Fri, 01-Apr-2022 03:01:18 GMT; path=/; secure; HttpOnly; SameSite=None",
24-
"esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrilfC6CpFwDCJp8MIo2nsY9jI-Ybt0tJt9Mf-4XVVzWyk0bFIOjFyUEApw_1aUdn7h-vmu1G4x5f-S2UohO-6JzVazFIynY00BvV6yUYRArAlba-MbOSMMWedRzh9NbWDAj3XpFC-XdF6miHzamKvna5p68QfLwh8Yoew2-h7mLkgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None",
25-
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
26-
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
27-
],
22+
"Set-Cookie": "[set-cookie;]",
2823
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
2924
"X-Content-Type-Options": "nosniff",
30-
"x-ms-ests-server": "2.1.12507.17 - NCUS ProdSlices",
31-
"x-ms-request-id": "9460e8b4-3927-46ea-8c0a-3c12e7410300"
25+
"x-ms-ests-server": "2.1.12529.17 - NCUS ProdSlices",
26+
"x-ms-request-id": "9e1bce42-1cd8-45a4-a548-d36b5130bf00"
3227
},
3328
"ResponseBody": {
3429
"token_endpoint": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token",
@@ -105,8 +100,8 @@
105100
"Accept": "application/json",
106101
"Accept-Encoding": "gzip, deflate",
107102
"Connection": "keep-alive",
108-
"Cookie": "fpc=fpc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
109-
"User-Agent": "azsdk-python-identity/1.8.0b2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
103+
"Cookie": "cookie;",
104+
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
110105
},
111106
"RequestBody": null,
112107
"StatusCode": 200,
@@ -116,17 +111,13 @@
116111
"Cache-Control": "max-age=86400, private",
117112
"Content-Length": "945",
118113
"Content-Type": "application/json; charset=utf-8",
119-
"Date": "Wed, 02 Mar 2022 03:01:18 GMT",
114+
"Date": "Wed, 09 Mar 2022 12:35:04 GMT",
120115
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
121-
"Set-Cookie": [
122-
"fpc=fpc; expires=Fri, 01-Apr-2022 03:01:19 GMT; path=/; secure; HttpOnly; SameSite=None",
123-
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
124-
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
125-
],
116+
"Set-Cookie": "[set-cookie;]",
126117
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
127118
"X-Content-Type-Options": "nosniff",
128-
"x-ms-ests-server": "2.1.12529.16 - SEASLR2 ProdSlices",
129-
"x-ms-request-id": "d2d17ebf-f1d8-4d7c-a1de-669105642800"
119+
"x-ms-ests-server": "2.1.12559.5 - SEASLR1 ProdSlices",
120+
"x-ms-request-id": "41f57ba3-5d47-4571-9dab-0b3ac0570700"
130121
},
131122
"ResponseBody": {
132123
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
@@ -181,41 +172,37 @@
181172
"RequestHeaders": {
182173
"Accept": "application/json",
183174
"Accept-Encoding": "gzip, deflate",
184-
"client-request-id": "d284d3f8-045d-498b-9190-7395a9b6279e",
175+
"client-request-id": "9f39083c-88ab-4aa8-a157-6430bb777b2e",
185176
"Connection": "keep-alive",
186-
"Content-Length": "289",
177+
"Content-Length": "291",
187178
"Content-Type": "application/x-www-form-urlencoded",
188-
"Cookie": "fpc=fpc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
189-
"User-Agent": "azsdk-python-identity/1.8.0b2 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
179+
"Cookie": "cookie;",
180+
"User-Agent": "azsdk-python-identity/1.9.0b2 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
190181
"x-client-cpu": "x64",
191182
"x-client-current-telemetry": "4|730,0|",
192183
"x-client-last-telemetry": "4|0|||",
193184
"x-client-os": "win32",
194185
"x-client-sku": "MSAL.Python",
195-
"x-client-ver": "1.16.0",
186+
"x-client-ver": "1.17.0",
196187
"x-ms-lib-capability": "retry-after, h429"
197188
},
198-
"RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q~IsFayrD0V_8oyOfygU-GE3ELOabq95a\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default",
189+
"RequestBody": "client_id=a2df54d5-ab03-4725-9b80-9a00b3b1967f\u0026grant_type=client_credentials\u0026client_info=1\u0026client_secret=0vj7Q%7EIsFayrD0V_8oyOfygU-GE3ELOabq95a\u0026claims=%7B%22access_token%22%3A\u002B%7B%22xms_cc%22%3A\u002B%7B%22values%22%3A\u002B%5B%22CP1%22%5D%7D%7D%7D\u0026scope=https%3A%2F%2Fmanagement.azure.com%2F.default",
199190
"StatusCode": 200,
200191
"ResponseHeaders": {
201192
"Cache-Control": "no-store, no-cache",
202-
"client-request-id": "d284d3f8-045d-498b-9190-7395a9b6279e",
193+
"client-request-id": "9f39083c-88ab-4aa8-a157-6430bb777b2e",
203194
"Content-Length": "93",
204195
"Content-Type": "application/json; charset=utf-8",
205-
"Date": "Wed, 02 Mar 2022 03:01:19 GMT",
196+
"Date": "Wed, 09 Mar 2022 12:35:04 GMT",
206197
"Expires": "-1",
207198
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
208199
"Pragma": "no-cache",
209-
"Set-Cookie": [
210-
"fpc=fpc; expires=Fri, 01-Apr-2022 03:01:19 GMT; path=/; secure; HttpOnly; SameSite=None",
211-
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
212-
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
213-
],
200+
"Set-Cookie": "[set-cookie;]",
214201
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
215202
"X-Content-Type-Options": "nosniff",
216203
"x-ms-clitelem": "1,0,0,,",
217-
"x-ms-ests-server": "2.1.12507.17 - NCUS ProdSlices",
218-
"x-ms-request-id": "9460e8b4-3927-46ea-8c0a-3c12f4410300"
204+
"x-ms-ests-server": "2.1.12529.17 - SCUS ProdSlices",
205+
"x-ms-request-id": "d22fb100-cf87-4582-831f-10617002e600"
219206
},
220207
"ResponseBody": {
221208
"token_type": "Bearer",
@@ -234,8 +221,8 @@
234221
"Connection": "keep-alive",
235222
"Content-Length": "102",
236223
"Content-Type": "application/json",
237-
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
238-
"x-ms-client-request-id": "07a079d8-99d5-11ec-93ab-70b5e82527ff"
224+
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
225+
"x-ms-client-request-id": "57e0a38c-9fa5-11ec-b53a-c0b6f9946f2d"
239226
},
240227
"RequestBody": {
241228
"location": "eastus",
@@ -249,7 +236,7 @@
249236
"Cache-Control": "no-cache",
250237
"Content-Encoding": "gzip",
251238
"Content-Type": "application/json; charset=utf-8",
252-
"Date": "Wed, 02 Mar 2022 03:01:27 GMT",
239+
"Date": "Wed, 09 Mar 2022 12:35:13 GMT",
253240
"Expires": "-1",
254241
"Pragma": "no-cache",
255242
"Server": [
@@ -260,11 +247,11 @@
260247
"Transfer-Encoding": "chunked",
261248
"Vary": "Accept-Encoding",
262249
"X-Content-Type-Options": "nosniff",
263-
"x-ms-correlation-request-id": "650b737e-1f45-4a4d-8652-a373ef065bdf",
264-
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/PutVM3Min;745,Microsoft.Compute/PutVM30Min;3725",
250+
"x-ms-correlation-request-id": "da0c45d3-b40b-45eb-8cfb-4452bf252487",
251+
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/PutVM3Min;745,Microsoft.Compute/PutVM30Min;3729",
265252
"x-ms-ratelimit-remaining-subscription-writes": "1199",
266-
"x-ms-request-id": "1533d5df-402d-4d68-b571-28dc827bf3fe",
267-
"x-ms-routing-request-id": "SOUTHEASTASIA:20220302T030128Z:650b737e-1f45-4a4d-8652-a373ef065bdf"
253+
"x-ms-request-id": "f73f4fed-4be1-42b4-b381-a116beb8a561",
254+
"x-ms-routing-request-id": "SOUTHEASTASIA:20220309T123514Z:da0c45d3-b40b-45eb-8cfb-4452bf252487"
268255
},
269256
"ResponseBody": {
270257
"name": "availabilitysetse8d12c44",
@@ -288,16 +275,16 @@
288275
"Accept-Encoding": "gzip, deflate",
289276
"Authorization": "Sanitized",
290277
"Connection": "keep-alive",
291-
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
292-
"x-ms-client-request-id": "0e25621e-99d5-11ec-af46-70b5e82527ff"
278+
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
279+
"x-ms-client-request-id": "5e512b80-9fa5-11ec-adfd-c0b6f9946f2d"
293280
},
294281
"RequestBody": null,
295282
"StatusCode": 200,
296283
"ResponseHeaders": {
297284
"Cache-Control": "no-cache",
298285
"Content-Encoding": "gzip",
299286
"Content-Type": "application/json; charset=utf-8",
300-
"Date": "Wed, 02 Mar 2022 03:01:27 GMT",
287+
"Date": "Wed, 09 Mar 2022 12:35:14 GMT",
301288
"Expires": "-1",
302289
"Pragma": "no-cache",
303290
"Server": [
@@ -308,11 +295,11 @@
308295
"Transfer-Encoding": "chunked",
309296
"Vary": "Accept-Encoding",
310297
"X-Content-Type-Options": "nosniff",
311-
"x-ms-correlation-request-id": "e5132b27-1d92-47ab-885d-4a208b2f9a6c",
312-
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/LowCostGet3Min;3999,Microsoft.Compute/LowCostGet30Min;31993",
298+
"x-ms-correlation-request-id": "38199358-0806-4c4b-b0e0-94f8feb0ece3",
299+
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/LowCostGet3Min;3999,Microsoft.Compute/LowCostGet30Min;31999",
313300
"x-ms-ratelimit-remaining-subscription-reads": "11999",
314-
"x-ms-request-id": "95480f69-14ce-401b-ade0-b94e29eb650d",
315-
"x-ms-routing-request-id": "SOUTHEASTASIA:20220302T030128Z:e5132b27-1d92-47ab-885d-4a208b2f9a6c"
301+
"x-ms-request-id": "70fc2ec3-ed31-4f68-9e1b-7945dd5f2b28",
302+
"x-ms-routing-request-id": "SOUTHEASTASIA:20220309T123514Z:38199358-0806-4c4b-b0e0-94f8feb0ece3"
316303
},
317304
"ResponseBody": {
318305
"name": "availabilitysetse8d12c44",
@@ -339,8 +326,8 @@
339326
"Connection": "keep-alive",
340327
"Content-Length": "80",
341328
"Content-Type": "application/json",
342-
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
343-
"x-ms-client-request-id": "0f089796-99d5-11ec-bf23-70b5e82527ff"
329+
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
330+
"x-ms-client-request-id": "5e84152c-9fa5-11ec-8d98-c0b6f9946f2d"
344331
},
345332
"RequestBody": {
346333
"properties": {
@@ -353,7 +340,7 @@
353340
"Cache-Control": "no-cache",
354341
"Content-Encoding": "gzip",
355342
"Content-Type": "application/json; charset=utf-8",
356-
"Date": "Wed, 02 Mar 2022 03:01:28 GMT",
343+
"Date": "Wed, 09 Mar 2022 12:35:14 GMT",
357344
"Expires": "-1",
358345
"Pragma": "no-cache",
359346
"Server": [
@@ -364,11 +351,11 @@
364351
"Transfer-Encoding": "chunked",
365352
"Vary": "Accept-Encoding",
366353
"X-Content-Type-Options": "nosniff",
367-
"x-ms-correlation-request-id": "9c375c91-9324-4475-b02f-cbf407a93642",
368-
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/PutVM3Min;744,Microsoft.Compute/PutVM30Min;3724",
354+
"x-ms-correlation-request-id": "24316763-9a8d-4a60-8c87-8f49b3db6a77",
355+
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/PutVM3Min;744,Microsoft.Compute/PutVM30Min;3728",
369356
"x-ms-ratelimit-remaining-subscription-writes": "1198",
370-
"x-ms-request-id": "526eb979-78bc-4fa7-8d75-6779f2d2dc75",
371-
"x-ms-routing-request-id": "SOUTHEASTASIA:20220302T030129Z:9c375c91-9324-4475-b02f-cbf407a93642"
357+
"x-ms-request-id": "19f5f6ed-c56c-4d00-9001-527b8043131f",
358+
"x-ms-routing-request-id": "SOUTHEASTASIA:20220309T123515Z:24316763-9a8d-4a60-8c87-8f49b3db6a77"
372359
},
373360
"ResponseBody": {
374361
"name": "availabilitysetse8d12c44",
@@ -393,15 +380,15 @@
393380
"Authorization": "Sanitized",
394381
"Connection": "keep-alive",
395382
"Content-Length": "0",
396-
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
397-
"x-ms-client-request-id": "0f42b815-99d5-11ec-96ce-70b5e82527ff"
383+
"User-Agent": "azsdk-python-azure-mgmt-compute/26.1.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
384+
"x-ms-client-request-id": "5ec9613a-9fa5-11ec-8677-c0b6f9946f2d"
398385
},
399386
"RequestBody": null,
400387
"StatusCode": 200,
401388
"ResponseHeaders": {
402389
"Cache-Control": "no-cache",
403390
"Content-Length": "0",
404-
"Date": "Wed, 02 Mar 2022 03:01:35 GMT",
391+
"Date": "Wed, 09 Mar 2022 12:35:20 GMT",
405392
"Expires": "-1",
406393
"Pragma": "no-cache",
407394
"Server": [
@@ -410,11 +397,11 @@
410397
],
411398
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
412399
"X-Content-Type-Options": "nosniff",
413-
"x-ms-correlation-request-id": "9bafbac0-5aba-42fc-8acd-c6cd4b883d84",
414-
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/DeleteVM3Min;239,Microsoft.Compute/DeleteVM30Min;1197",
400+
"x-ms-correlation-request-id": "dbd18b43-20d8-4e22-9144-04f1a7fc5c53",
401+
"x-ms-ratelimit-remaining-resource": "Microsoft.Compute/DeleteVM3Min;239,Microsoft.Compute/DeleteVM30Min;1199",
415402
"x-ms-ratelimit-remaining-subscription-deletes": "14999",
416-
"x-ms-request-id": "dd5da8bc-7015-4d1e-ad99-dd1297c484cc",
417-
"x-ms-routing-request-id": "SOUTHEASTASIA:20220302T030136Z:9bafbac0-5aba-42fc-8acd-c6cd4b883d84"
403+
"x-ms-request-id": "0a6af0af-b182-405c-a56a-4b1596b88e83",
404+
"x-ms-routing-request-id": "SOUTHEASTASIA:20220309T123521Z:dbd18b43-20d8-4e22-9144-04f1a7fc5c53"
418405
},
419406
"ResponseBody": null
420407
}

0 commit comments

Comments
 (0)