Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[consumtion] Update test #23392

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions sdk/advisor/azure-mgmt-advisor/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from dotenv import load_dotenv

from devtools_testutils import test_proxy, add_general_regex_sanitizer
from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_header_regex_sanitizer, add_body_key_sanitizer

# Ignore async tests for Python < 3.5
collect_ignore_glob = []
Expand All @@ -44,4 +44,9 @@ def add_sanitizers(test_proxy):
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex='eyJ0eXAiOiJKV.*?"', value='access_token"')
add_general_regex_sanitizer(regex='fpc=.*?;', value='fpc=fpc;')
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
add_header_regex_sanitizer(key="Cookie", value="cookie;")
add_body_key_sanitizer(json_path="$..access_token", value="access_token")
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -17,18 +17,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "1753",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:34 GMT",
"Date": "Mon, 07 Mar 2022 08:18:02 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AsDCUFcFnsBBiiNJjhB8iQc; expires=Sat, 08-Jan-2022 05:38:34 GMT; path=/; secure; HttpOnly; SameSite=None",
"esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr86o01hgs-negCJu-h9gg0IERYW4rC_GHw0aWVNcGET9VmE5lu0-7E6zvqHt3nBODTxzsxD2X8WodEKzpRMcE__bByohLvCviGOZLDWCDzTQAhECofNfKbfEqSKwnQy90rYqhl8v2SaGmDt5vi9zqNk67S-gNV_ro5KEzzxaf5CAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12249.17 - NCUS ProdSlices",
"x-ms-request-id": "80ac9510-4e7f-497c-bc23-15c471070700"
"x-ms-ests-server": "2.1.12529.17 - WUS2 ProdSlices",
"x-ms-request-id": "fed66615-6e73-4c33-b430-a6b05acd9c00"
},
"ResponseBody": {
"token_endpoint": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token",
Expand Down Expand Up @@ -105,8 +100,8 @@
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Cookie": "fpc=AsDCUFcFnsBBiiNJjhB8iQc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)"
"Cookie": "cookie;",
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.6.2 (Windows-10-10.0.19041-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -116,17 +111,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "945",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:34 GMT",
"Date": "Mon, 07 Mar 2022 08:18:02 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AsDCUFcFnsBBiiNJjhB8iQc; expires=Sat, 08-Jan-2022 05:38:35 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-ests-server": "2.1.12261.14 - KRSLR2 ProdSlices",
"x-ms-request-id": "9e4deb1d-59f9-4f91-a0fa-cb1e5e300200"
"x-ms-ests-server": "2.1.12529.17 - KRSLR1 ProdSlices",
"x-ms-request-id": "43904e5e-a525-4361-9960-fb636d935300"
},
"ResponseBody": {
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
Expand Down Expand Up @@ -181,47 +172,43 @@
"RequestHeaders": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"client-request-id": "7fa3431e-4aef-405b-afac-0864733df3fa",
"client-request-id": "52c2b3eb-891b-4b64-9091-d55de2ccb251",
"Connection": "keep-alive",
"Content-Length": "289",
"Content-Length": "291",
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "fpc=AsDCUFcFnsBBiiNJjhB8iQc; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd",
"User-Agent": "azsdk-python-identity/1.7.2 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"Cookie": "cookie;",
"User-Agent": "azsdk-python-identity/1.9.0b1 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-client-cpu": "x64",
"x-client-current-telemetry": "4|730,0|",
"x-client-last-telemetry": "4|0|||",
"x-client-os": "win32",
"x-client-sku": "MSAL.Python",
"x-client-ver": "1.16.0",
"x-client-ver": "1.17.0",
"x-ms-lib-capability": "retry-after, h429"
},
"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",
"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",
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-store, no-cache",
"client-request-id": "7fa3431e-4aef-405b-afac-0864733df3fa",
"Content-Length": "1391",
"client-request-id": "52c2b3eb-891b-4b64-9091-d55de2ccb251",
"Content-Length": "93",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:35 GMT",
"Date": "Mon, 07 Mar 2022 08:18:02 GMT",
"Expires": "-1",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Pragma": "no-cache",
"Set-Cookie": [
"fpc=AsDCUFcFnsBBiiNJjhB8iQeZHqKEAQAAAFuNQ9kOAAAA; expires=Sat, 08-Jan-2022 05:38:35 GMT; path=/; secure; HttpOnly; SameSite=None",
"x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly",
"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly"
],
"Set-Cookie": "[set-cookie;]",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"x-ms-clitelem": "1,0,0,,",
"x-ms-ests-server": "2.1.12249.17 - EUS ProdSlices",
"x-ms-request-id": "c115232d-270f-41e6-bf50-82b0ae060700"
"x-ms-ests-server": "2.1.12529.17 - NCUS ProdSlices",
"x-ms-request-id": "d96c0939-88ed-40a8-a937-73d9ac344100"
},
"ResponseBody": {
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 3599,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCIsImtpZCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuYXp1cmUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvNTQ4MjZiMjItMzhkNi00ZmIyLWJhZDktYjdiOTNhM2U5YzVhLyIsImlhdCI6MTYzOTAyODAxNSwibmJmIjoxNjM5MDI4MDE1LCJleHAiOjE2MzkwMzE5MTUsImFpbyI6IkUyWmdZR0FMV2xIem1sbTY5OXdOQTBYclBadjhBQT09IiwiYXBwaWQiOiJhMmRmNTRkNS1hYjAzLTQ3MjUtOWI4MC05YTAwYjNiMTk2N2YiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC81NDgyNmIyMi0zOGQ2LTRmYjItYmFkOS1iN2I5M2EzZTljNWEvIiwiaWR0eXAiOiJhcHAiLCJvaWQiOiI4ODdjNDJiMS03OTQ2LTRjMjItYmFhNi0xNTA0M2U0YjEzMjMiLCJyaCI6IjAuQVRjQUltdUNWTlk0c2stNjJiZTVPajZjV3RWVTM2SURxeVZIbTRDYUFMT3hsbjgzQUFBLiIsInN1YiI6Ijg4N2M0MmIxLTc5NDYtNGMyMi1iYWE2LTE1MDQzZTRiMTMyMyIsInRpZCI6IjU0ODI2YjIyLTM4ZDYtNGZiMi1iYWQ5LWI3YjkzYTNlOWM1YSIsInV0aSI6IkxTTVZ3UThuNWtHX1VJS3dyZ1lIQUEiLCJ2ZXIiOiIxLjAiLCJ4bXNfY2MiOlsiQ1AxIl0sInhtc190Y2R0IjoxNDEyMjA2ODQwfQ.OhFiptlKIo3vKEos1xz90MZKchpmokZKxUBtGpBnZ7NdxG9UQbu84F3IC6ftb6M_neAhK-a3lQWu2ibZY1RaHe-953ts4ePfq49fWVARJ7Hc3O4FJQJrLI94sWVq4JyxfN5uPfvAcEyLvGsu-qQWZR3Pd1eaQZoySmzqPNUyq0kQ17z-gVf0PmidcvtFZXvG9ppfL8P5Pu80D_oZCTHD07XTT_dWCvlZXRoMtm3uumMaYF7kPzpkcavMzRwnqkkBzyZMOPSYLMzI93jspqCJZ0HeRpjDeYyJo2ayAOZ09bqaM9LaY3WBw_Om8wibddulKFzLqEogdaQjErdVGVyzGA"
"access_token": "access_token"
}
},
{
Expand All @@ -234,27 +221,31 @@
"Connection": "keep-alive",
"Content-Length": "33",
"Content-Type": "application/json",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "3f8ca5ad-58b2-11ec-837d-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "1b9c2f9e-9def-11ec-b7cd-c0b6f9946f2d"
},
"RequestBody": {
"properties": {
"exclude": true
}
},
"RequestBody": "{\u0022properties\u0022: {\u0022exclude\u0022: true}}",
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
"Date": "Mon, 07 Mar 2022 08:18:05 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "2cd100b6-2607-4893-9897-91f20beb0cef",
"x-ms-correlation-request-id": "d00d80fc-4d35-477e-9fbe-e7aad345fe1b",
"x-ms-ratelimit-remaining-subscription-resource-requests": "199",
"x-ms-request-id": "3f8ca5ad-58b2-11ec-837d-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:2cd100b6-2607-4893-9897-91f20beb0cef"
"x-ms-request-id": "1b9c2f9e-9def-11ec-b7cd-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220307T081805Z:d00d80fc-4d35-477e-9fbe-e7aad345fe1b"
},
"ResponseBody": {
"properties": {
Expand All @@ -273,27 +264,27 @@
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "41d3a224-58b2-11ec-bdf8-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "1d43a6b6-9def-11ec-a77a-c0b6f9946f2d"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
"Date": "Mon, 07 Mar 2022 08:18:05 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "99c0ddc2-6519-4c87-aba3-47d19b806c49",
"x-ms-correlation-request-id": "deba8d4d-a8c4-4483-924d-82a02c7e095e",
"x-ms-ratelimit-remaining-subscription-resource-requests": "599",
"x-ms-request-id": "41d3a224-58b2-11ec-bdf8-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:99c0ddc2-6519-4c87-aba3-47d19b806c49"
"x-ms-request-id": "1d43a6b6-9def-11ec-a77a-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220307T081805Z:deba8d4d-a8c4-4483-924d-82a02c7e095e"
},
"ResponseBody": {
"value": [
Expand All @@ -318,27 +309,31 @@
"Connection": "keep-alive",
"Content-Length": "34",
"Content-Type": "application/json",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "41f7e188-58b2-11ec-871b-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "1d59690c-9def-11ec-9d69-c0b6f9946f2d"
},
"RequestBody": {
"properties": {
"exclude": false
}
},
"RequestBody": "{\u0022properties\u0022: {\u0022exclude\u0022: false}}",
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:37 GMT",
"Date": "Mon, 07 Mar 2022 08:18:05 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "f1e2348a-9509-4d01-b2e3-68d3ad2bfee8",
"x-ms-correlation-request-id": "a8ce6336-bb7a-4967-9106-a5f3ddc50536",
"x-ms-ratelimit-remaining-subscription-resource-requests": "198",
"x-ms-request-id": "41f7e188-58b2-11ec-871b-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053837Z:f1e2348a-9509-4d01-b2e3-68d3ad2bfee8"
"x-ms-request-id": "1d59690c-9def-11ec-9d69-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220307T081806Z:a8ce6336-bb7a-4967-9106-a5f3ddc50536"
},
"ResponseBody": {
"properties": {
Expand All @@ -357,27 +352,27 @@
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "4236590c-58b2-11ec-8f59-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-advisor/9.0.0 Python/3.6.2 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "1d8ad5ba-9def-11ec-90db-c0b6f9946f2d"
},
"RequestBody": null,
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Thu, 09 Dec 2021 05:38:38 GMT",
"Date": "Mon, 07 Mar 2022 08:18:05 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Microsoft-HTTPAPI/2.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "a6e1c244-4ab2-4f69-ae1b-386d1ce5e4db",
"x-ms-correlation-request-id": "90731341-7663-42f0-a101-5be47aea48eb",
"x-ms-ratelimit-remaining-subscription-resource-requests": "598",
"x-ms-request-id": "4236590c-58b2-11ec-8f59-70b5e82527ff",
"x-ms-routing-request-id": "JAPANEAST:20211209T053838Z:a6e1c244-4ab2-4f69-ae1b-386d1ce5e4db"
"x-ms-request-id": "1d8ad5ba-9def-11ec-90db-c0b6f9946f2d",
"x-ms-routing-request-id": "KOREASOUTH:20220307T081806Z:90731341-7663-42f0-a101-5be47aea48eb"
},
"ResponseBody": {
"value": [
Expand Down
Loading