Skip to content

Commit fea2912

Browse files
authored
Update marketplaceordering test (Azure#23335)
Co-authored-by: ZiWei Chen (WICRESOFT NORTH AMERICA LTD) <[email protected]>
1 parent f67c84a commit fea2912

File tree

2 files changed

+38
-50
lines changed

2 files changed

+38
-50
lines changed

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

Lines changed: 5 additions & 1 deletion
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
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 = []
@@ -44,4 +45,7 @@ def add_sanitizers(test_proxy):
4445
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
4546
tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
4647
add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000")
47-
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
48+
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
49+
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
50+
add_header_regex_sanitizer(key="Cookie", value="cookie;")
51+
add_body_key_sanitizer(json_path="$..access_token", value="access_token")

sdk/marketplaceordering/azure-mgmt-marketplaceordering/tests/recordings/test_mgmt_mpo.pyTestMgmtMPOtest_basic.json

Lines changed: 33 additions & 49 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.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
10+
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.9.10 (Windows-10-10.0.22000-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": "Tue, 04 Jan 2022 07:15:43 GMT",
20+
"Date": "Fri, 04 Mar 2022 07:19:16 GMT",
2121
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
22-
"Set-Cookie": [
23-
"fpc=AmjWHkC6lEBNoWZmiFll-9o; expires=Thu, 03-Feb-2022 07:15:43 GMT; path=/; secure; HttpOnly; SameSite=None",
24-
"esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr-Gk9IUEK02vMwy-IM8BtHrtdzCcJ2eXdwP61oJyxR7gPSHz4EDHlb53rQmeDfZiAVL53vK6S6YH_APNtA5zzWDIYMWaw8CTKe4e0BwftKO8OlnZyd2iv62FhTMtcbcNg99Htm_tJZGzIOwXVLMVGGQM8vOHvEfmLTag4p8LeTd4gAA; 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.12261.17 - SCUS ProdSlices",
31-
"x-ms-request-id": "15db148a-a6d1-43f1-bb24-17199cb89b02"
25+
"x-ms-ests-server": "2.1.12529.17 - WUS2 ProdSlices",
26+
"x-ms-request-id": "97cf9ffd-578e-4f99-a6b2-fec39e050d00"
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=AmjWHkC6lEBNoWZmiFll-9o; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
109-
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
103+
"Cookie": "cookie;",
104+
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.9.10 (Windows-10-10.0.22000-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": "Tue, 04 Jan 2022 07:15:43 GMT",
114+
"Date": "Fri, 04 Mar 2022 07:19:16 GMT",
120115
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
121-
"Set-Cookie": [
122-
"fpc=AmjWHkC6lEBNoWZmiFll-9o; expires=Thu, 03-Feb-2022 07:15:43 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.12261.17 - KRSLR1 ProdSlices",
129-
"x-ms-request-id": "4a229268-50b8-4df0-8d9c-388e4ac65b00"
119+
"x-ms-ests-server": "2.1.12529.17 - SEASLR2 ProdSlices",
120+
"x-ms-request-id": "7979565c-383e-44af-a659-642db4f00d00"
130121
},
131122
"ResponseBody": {
132123
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
@@ -181,47 +172,43 @@
181172
"RequestHeaders": {
182173
"Accept": "application/json",
183174
"Accept-Encoding": "gzip, deflate",
184-
"client-request-id": "c7ccf98c-3e4a-4ffa-bda7-23f178182df0",
175+
"client-request-id": "589da6bc-b300-45ec-ae04-3730cd5e2807",
185176
"Connection": "keep-alive",
186177
"Content-Length": "289",
187178
"Content-Type": "application/x-www-form-urlencoded",
188-
"Cookie": "fpc=AmjWHkC6lEBNoWZmiFll-9o; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
189-
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
179+
"Cookie": "cookie;",
180+
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.9.10 (Windows-10-10.0.22000-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
},
198189
"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",
199190
"StatusCode": 200,
200191
"ResponseHeaders": {
201192
"Cache-Control": "no-store, no-cache",
202-
"client-request-id": "c7ccf98c-3e4a-4ffa-bda7-23f178182df0",
203-
"Content-Length": "1391",
193+
"client-request-id": "589da6bc-b300-45ec-ae04-3730cd5e2807",
194+
"Content-Length": "93",
204195
"Content-Type": "application/json; charset=utf-8",
205-
"Date": "Tue, 04 Jan 2022 07:15:43 GMT",
196+
"Date": "Fri, 04 Mar 2022 07:19:16 GMT",
206197
"Expires": "-1",
207198
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
208199
"Pragma": "no-cache",
209-
"Set-Cookie": [
210-
"fpc=AmjWHkC6lEBNoWZmiFll-9qZHqKEAQAAAB_rZdkOAAAA; expires=Thu, 03-Feb-2022 07:15:44 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.12261.17 - NCUS ProdSlices",
218-
"x-ms-request-id": "1f922622-f54e-4bbe-89a9-ac5adc53d601"
204+
"x-ms-ests-server": "2.1.12529.17 - WUS2 ProdSlices",
205+
"x-ms-request-id": "97cf9ffd-578e-4f99-a6b2-fec3a5050d00"
219206
},
220207
"ResponseBody": {
221208
"token_type": "Bearer",
222209
"expires_in": 3599,
223210
"ext_expires_in": 3599,
224-
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCIsImtpZCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNTQ4MjZiMjItMzhkNi00ZmIyLWJhZDktYjdiOTNhM2U5YzVhLyIsImlhdCI6MTY0MTI4MDI0NCwibmJmIjoxNjQxMjgwMjQ0LCJleHAiOjE2NDEyODQxNDQsImFpbyI6IkUyWmdZTmpMRmJUL2hObjJoNnFTQnc2MUxuNXpGZ0E9IiwiYXBwaWQiOiJhMmRmNTRkNS1hYjAzLTQ3MjUtOWI4MC05YTAwYjNiMTk2N2YiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC81NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEvIiwiaWR0eXAiOiJhcHAiLCJvaWQiOiI4ODdjNDJiMS03OTQ2LTRjMjItYmFhNi0xNTA0M2U0YjEzMjMiLCJyaCI6IjAuQVRjQUltdUNWTlk0c2stNjJiZTVPajZjV3RWVTM2SURxeVZIbTRDYUFMT3hsbjgzQUFBLiIsInN1YiI6Ijg4N2M0MmIxLTc5NDYtNGMyMi1iYWE2LTE1MDQzZTRiMTMyMyIsInRpZCI6IjU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YSIsInV0aSI6IklpYVNIMDcxdmt1SnFheGEzRlBXQVEiLCJ2ZXIiOiIxLjAiLCJ4bXNfY2MiOlsiQ1AxIl0sInhtc190Y2R0IjoxNDEyMjA2ODQwfQ.LzOEHdFile5UcI9C2r4pfqXKuPVHUpDgKKNr5btYiYV2BjXZNnqn6cCGh0kLLtRYyM0mvMMgF0sTh1gI4u6P93iWdgP76IrgTpiZxMKBc5TInlNNdXE_uu3L8efzOXKspym0OHQkXkMSBzPzZCERTGINtKvuMJnzCA8Sk01CX5IjxIVUrZBSoM_9yuRhW4PiZfBnFvcNuCA54UTSGrc7P4s3B8HXk9FpowxDF0Ti-jZDrFc7xi4FpTaFgxLn80dG8Q9WiFtqNlFZJQpWs9ALuoNK4_rqYOvabCSnrUeJVOblslUxMyQt4TsAtAZkFGhgWpEy7_OfltYPLG3sJfrnRw"
211+
"access_token": "access_token"
225212
}
226213
},
227214
{
@@ -232,23 +219,20 @@
232219
"Accept-Encoding": "gzip, deflate",
233220
"Authorization": "Sanitized",
234221
"Connection": "keep-alive",
235-
"User-Agent": "azsdk-python-mgmt-marketplaceordering/1.1.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
236-
"x-ms-client-request-id": "20d264f7-6d2e-11ec-9759-70b5e82527ff"
222+
"User-Agent": "azsdk-python-mgmt-marketplaceordering/1.1.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
223+
"x-ms-client-request-id": "6d99e33f-9b8b-11ec-8e04-d08e79139a4a"
237224
},
238225
"RequestBody": null,
239226
"StatusCode": 200,
240227
"ResponseHeaders": {
241228
"Cache-Control": "no-cache",
242229
"Content-Encoding": "gzip",
243230
"Content-Type": "application/json; charset=utf-8",
244-
"Date": "Tue, 04 Jan 2022 07:15:49 GMT",
231+
"Date": "Fri, 04 Mar 2022 07:19:21 GMT",
245232
"Expires": "-1",
246233
"Pragma": "no-cache",
247234
"Server": "Microsoft-IIS/10.0",
248-
"Set-Cookie": [
249-
"ARRAffinity=6baab673920cdd72d5292ed70f53157373a58e78fa4d23722efa3ae6748c9e7b;Path=/;HttpOnly;Secure;Domain=storeapi.azure.com",
250-
"ARRAffinitySameSite=6baab673920cdd72d5292ed70f53157373a58e78fa4d23722efa3ae6748c9e7b;Path=/;HttpOnly;SameSite=None;Secure;Domain=storeapi.azure.com"
251-
],
235+
"Set-Cookie": "[set-cookie;]",
252236
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
253237
"Transfer-Encoding": "chunked",
254238
"Vary": [
@@ -257,10 +241,10 @@
257241
],
258242
"X-Content-Type-Options": "nosniff",
259243
"X-Frame-Options": "SAMEORIGIN",
260-
"x-ms-correlation-request-id": "201998fa-a773-4e3e-bab3-d937daa17fac",
244+
"x-ms-correlation-request-id": "b4543909-4879-4d55-a6e1-51543ac23b36",
261245
"x-ms-ratelimit-remaining-subscription-reads": "11999",
262-
"x-ms-request-id": "201998fa-a773-4e3e-bab3-d937daa17fac",
263-
"x-ms-routing-request-id": "SOUTHEASTASIA:20220104T071550Z:201998fa-a773-4e3e-bab3-d937daa17fac",
246+
"x-ms-request-id": "b4543909-4879-4d55-a6e1-51543ac23b36",
247+
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T071922Z:b4543909-4879-4d55-a6e1-51543ac23b36",
264248
"X-Powered-By": "ASP.NET"
265249
},
266250
"ResponseBody": {
@@ -274,17 +258,17 @@
274258
"licenseTextLink": "https://mpcprodsa.blob.core.windows.net/legalterms/3E5ED_legalterms_INTEL%253a2DBIGDL%253a24BIGDL%253a5FVM%253a24BIGDL%253a5FVM%253a5F0P4%253a24LPVML5SNN52KTQK2VUTTKOQB2GF5VLGDDHYIMTNCI5TVT54RPWAEFUUJFPSGA2SZ7YGQ4EEOVRA6UCUVLHC7JNZNNCNFUJT63EQ2XVI.txt",
275259
"privacyPolicyLink": "https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html",
276260
"marketplaceTermsLink": "https://mpcprodsa.blob.core.windows.net/marketplaceterms/3EDEF_marketplaceterms_VIRTUALMACHINE%253a24AAK2OAIZEAWW5H4MSP5KSTVB6NDKKRTUBAU23BRFTWN4YC2MQLJUB5ZEYUOUJBVF3YK34CIVPZL2HWYASPGDUY5O2FWEGRBYOXWZE5Y.txt",
277-
"retrieveDatetime": "2022-01-04T07:15:49.8619541Z",
278-
"signature": "WNZ4ULPKSNZ6TDTBF53Y45JEOEOVFTSCPRTR6W5CRWUS2RCSQ6WFATAP33DOTB7HUFIIML5FWYGDW6P4ME22P6HX7HY4ITIDJFVAE4Y",
261+
"retrieveDatetime": "2022-03-04T07:19:22.3819847Z",
262+
"signature": "BV5TK5LUXQB3US3WYB6PFOIPIBH2W6SNKSVAQRIGSNFXGQYCXU375ZERKVRDP5C6AZZBT74LCSCFAHICI3HZMU6OW6QBZ2EBGFS7OZY",
279263
"accepted": false
280264
},
281265
"systemData": {
282266
"createdBy": "00000000-0000-0000-0000-000000000000",
283267
"createdByType": "ManagedIdentity",
284-
"createdAt": "2022-01-04T07:15:50.0092808\u002B00:00",
268+
"createdAt": "2022-03-04T07:19:22.5119868\u002B00:00",
285269
"lastModifiedBy": "00000000-0000-0000-0000-000000000000",
286270
"lastModifiedByType": "ManagedIdentity",
287-
"lastModifiedAt": "2022-01-04T07:15:50.0092808\u002B00:00"
271+
"lastModifiedAt": "2022-03-04T07:19:22.5119868\u002B00:00"
288272
}
289273
}
290274
}

0 commit comments

Comments
 (0)