Skip to content

Commit

Permalink
Update notificationhubs test (Azure#23338)
Browse files Browse the repository at this point in the history
Co-authored-by: ZiWei Chen (WICRESOFT NORTH AMERICA LTD) <v-ziweichen@microsoft.com>
  • Loading branch information
2 people authored and rakshith91 committed Apr 7, 2022
1 parent 7ba33a1 commit 10cfb95
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from dotenv import load_dotenv

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

# Ignore async tests for Python < 3.5
collect_ignore_glob = []
Expand All @@ -44,4 +45,7 @@ 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_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.9.10 (Windows-10-10.0.22000-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -17,17 +17,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "1753",
"Content-Type": "application/json; charset=utf-8",
"Date": "Fri, 31 Dec 2021 08:20:41 GMT",
"Date": "Fri, 04 Mar 2022 08:11:41 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AtqrJk_1DbZLo1VtKcatuDyZHqKEAQAAAD60YNkOAAAA; expires=Sun, 30-Jan-2022 08:20:42 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.17 - EUS ProdSlices",
"x-ms-request-id": "9a88203e-e1f1-434e-a6df-24eed2ffb201"
"x-ms-ests-server": "2.1.12507.17 - EUS ProdSlices",
"x-ms-request-id": "b198224d-6380-4eca-b00e-ed4793159f00"
},
"ResponseBody": {
"token_endpoint": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token",
Expand Down Expand Up @@ -104,8 +100,8 @@
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Cookie": "fpc=AtqrJk_1DbZLo1VtKcatuDyZHqKEAQAAAD60YNkOAAAA; 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.9.10 (Windows-10-10.0.22000-SP0)"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -115,17 +111,13 @@
"Cache-Control": "max-age=86400, private",
"Content-Length": "945",
"Content-Type": "application/json; charset=utf-8",
"Date": "Fri, 31 Dec 2021 08:20:41 GMT",
"Date": "Fri, 04 Mar 2022 08:11:42 GMT",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Set-Cookie": [
"fpc=AtqrJk_1DbZLo1VtKcatuDyZHqKEAQAAAD60YNkOAAAA; expires=Sun, 30-Jan-2022 08:20:42 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.17 - SEASLR2 ProdSlices",
"x-ms-request-id": "f480e226-70a1-4283-a533-9f5e54e75600"
"x-ms-ests-server": "2.1.12529.17 - KRSLR1 ProdSlices",
"x-ms-request-id": "599c0258-b96a-4752-8240-152bb19f0e00"
},
"ResponseBody": {
"tenant_discovery_endpoint": "https://login.microsoftonline.com/common/.well-known/openid-configuration",
Expand Down Expand Up @@ -180,47 +172,43 @@
"RequestHeaders": {
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate",
"client-request-id": "7650a8e3-f4b3-4ebf-b40e-448f4cbe3900",
"client-request-id": "7c8d461d-26cb-44a5-a2eb-a3e32d8934bd",
"Connection": "keep-alive",
"Content-Length": "289",
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "fpc=AtqrJk_1DbZLo1VtKcatuDyZHqKEAQAAAD60YNkOAAAA; 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.9.10 (Windows-10-10.0.22000-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",
"StatusCode": 200,
"ResponseHeaders": {
"Cache-Control": "no-store, no-cache",
"client-request-id": "7650a8e3-f4b3-4ebf-b40e-448f4cbe3900",
"Content-Length": "1391",
"client-request-id": "7c8d461d-26cb-44a5-a2eb-a3e32d8934bd",
"Content-Length": "93",
"Content-Type": "application/json; charset=utf-8",
"Date": "Fri, 31 Dec 2021 08:20:42 GMT",
"Date": "Fri, 04 Mar 2022 08:11:42 GMT",
"Expires": "-1",
"P3P": "CP=\u0022DSP CUR OTPi IND OTRi ONL FIN\u0022",
"Pragma": "no-cache",
"Set-Cookie": [
"fpc=AtqrJk_1DbZLo1VtKcatuDyZHqKEAgAAAD60YNkOAAAA; expires=Sun, 30-Jan-2022 08:20:42 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.12261.17 - WUS2 ProdSlices",
"x-ms-request-id": "31332d36-1a20-4a6d-bd98-3ba52bdb1202"
"x-ms-ests-server": "2.1.12507.17 - EUS ProdSlices",
"x-ms-request-id": "b198224d-6380-4eca-b00e-ed4798159f00"
},
"ResponseBody": {
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 3599,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCIsImtpZCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCJ9.eyJhdW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qeqNSWiVv8J0K5nxIy6012QeWtuzDSOAe2IuG_NTfAj-5gVXAU1Pd9sQnCvLqFgH-HhMPvBWenevEdmPTqjsdiyuwANDXi1S351Air17iDIQ"
"access_token": "access_token"
}
},
{
Expand All @@ -233,30 +221,32 @@
"Connection": "keep-alive",
"Content-Length": "22",
"Content-Type": "application/json",
"User-Agent": "azsdk-python-mgmt-notificationhubs/7.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "8ae199b9-6a12-11ec-8658-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "c0b7b2f3-9b92-11ec-99d6-d08e79139a4a"
},
"RequestBody": {
"location": "eastus"
},
"RequestBody": "{\u0022location\u0022: \u0022eastus\u0022}",
"StatusCode": 201,
"ResponseHeaders": {
"api-supported-versions": "2014-09-01, 2016-03-01, 2017-04-01, 2020-01-01-preview",
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/1b2b34bf/providers/Microsoft.NotificationHubs/namespaces/namespacexxx/operations/Q3JlYXRlTmFtZXNwYWNlLTBiMWY2NDcxLTFiZjAtNGRkYS1hZWMzLWNiOTI3MmYwOTU5MC1uYW1lc3BhY2V4eHg7bmhwcm9kYmwyMDAxLTItZmFicmlj?api-version=2017-04-01",
"Cache-Control": "no-cache",
"Content-Length": "297",
"Content-Type": "application/json; charset=utf-8",
"Date": "Fri, 31 Dec 2021 08:20:48 GMT",
"Date": "Fri, 04 Mar 2022 08:11:48 GMT",
"Expires": "-1",
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/1b2b34bf/providers/Microsoft.NotificationHubs/namespaces/namespacexxx?api-version=2017-04-01",
"Pragma": "no-cache",
"Retry-After": "10",
"Server": "Kestrel",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"TrackingId": "3695a4c1-b416-4325-9e51-9fdfce80cacb",
"TrackingId": "379b125a-fcd9-4a69-8c50-dbf2af2a4c05",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "f6ff2e76-685a-448d-9b7d-0c8de62350f7",
"x-ms-correlation-request-id": "a08e5c92-7c61-45e2-b6f1-878ca83e60a1",
"x-ms-ratelimit-remaining-subscription-writes": "1197",
"x-ms-request-id": "f6ff2e76-685a-448d-9b7d-0c8de62350f7",
"x-ms-routing-request-id": "SOUTHEASTASIA:20211231T082048Z:f6ff2e76-685a-448d-9b7d-0c8de62350f7"
"x-ms-request-id": "a08e5c92-7c61-45e2-b6f1-878ca83e60a1",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T081149Z:a08e5c92-7c61-45e2-b6f1-878ca83e60a1"
},
"ResponseBody": {
"properties": {
Expand All @@ -277,8 +267,8 @@
"Accept-Encoding": "gzip, deflate",
"Authorization": "Sanitized",
"Connection": "keep-alive",
"User-Agent": "azsdk-python-mgmt-notificationhubs/7.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "8f005848-6a12-11ec-9df3-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "c55ca2c7-9b92-11ec-b9a0-d08e79139a4a"
},
"RequestBody": null,
"StatusCode": 200,
Expand All @@ -287,19 +277,19 @@
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Fri, 31 Dec 2021 08:20:49 GMT",
"Date": "Fri, 04 Mar 2022 08:11:49 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Kestrel",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"TrackingId": "4571081f-b03d-4b23-8097-b5c43199ebea",
"TrackingId": "7ca65553-c17b-460d-93e4-e8ef927da0da",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "14685727-5c09-4b0c-86dd-9a3c9380d655",
"x-ms-correlation-request-id": "5de5d287-d2ee-4913-b8c8-f0d9d15ecaf9",
"x-ms-ratelimit-remaining-subscription-reads": "11997",
"x-ms-request-id": "14685727-5c09-4b0c-86dd-9a3c9380d655",
"x-ms-routing-request-id": "SOUTHEASTASIA:20211231T082049Z:14685727-5c09-4b0c-86dd-9a3c9380d655"
"x-ms-request-id": "5de5d287-d2ee-4913-b8c8-f0d9d15ecaf9",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T081149Z:5de5d287-d2ee-4913-b8c8-f0d9d15ecaf9"
},
"ResponseBody": {
"sku": {
Expand All @@ -308,12 +298,14 @@
"properties": {
"provisioningState": "Succeeded",
"status": "Active",
"createdAt": "2021-12-31T08:20:48.2500000Z",
"updatedAt": "2021-12-31T08:20:48.3900000Z",
"createdAt": "2022-03-04T08:11:46.5300000Z",
"updatedAt": "2022-03-04T08:11:46.5370000Z",
"serviceBusEndpoint": "https://namespacexxx.servicebus.windows.net:443/",
"enabled": true,
"critical": false,
"zoneRedundant": false
"zoneRedundant": false,
"networkACLs": {},
"privateEndpointConnections": []
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/1b2b34bf/providers/Microsoft.NotificationHubs/namespaces/namespacexxx",
"name": "namespacexxx",
Expand All @@ -332,8 +324,8 @@
"Connection": "keep-alive",
"Content-Length": "2",
"Content-Type": "application/json",
"User-Agent": "azsdk-python-mgmt-notificationhubs/7.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "8f37255c-6a12-11ec-85d4-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "c594fc5a-9b92-11ec-8bb3-d08e79139a4a"
},
"RequestBody": {},
"StatusCode": 200,
Expand All @@ -342,32 +334,33 @@
"Cache-Control": "no-cache",
"Content-Encoding": "gzip",
"Content-Type": "application/json; charset=utf-8",
"Date": "Fri, 31 Dec 2021 08:20:50 GMT",
"Date": "Fri, 04 Mar 2022 08:11:50 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Kestrel",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"TrackingId": "a12d9711-0c22-418a-9a7d-8c4bdbe40040",
"TrackingId": "638a1acf-7688-41cf-a8b1-4dc335741e61",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "cec84e50-29ad-4bc7-939d-db302fa66646",
"x-ms-correlation-request-id": "fa83c633-f022-494b-94f9-ed9a225b31e0",
"x-ms-ratelimit-remaining-subscription-writes": "1196",
"x-ms-request-id": "cec84e50-29ad-4bc7-939d-db302fa66646",
"x-ms-routing-request-id": "SOUTHEASTASIA:20211231T082050Z:cec84e50-29ad-4bc7-939d-db302fa66646"
"x-ms-request-id": "fa83c633-f022-494b-94f9-ed9a225b31e0",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T081151Z:fa83c633-f022-494b-94f9-ed9a225b31e0"
},
"ResponseBody": {
"sku": {
"name": "Free"
},
"properties": {
"status": "Active",
"createdAt": "2021-12-31T08:20:48.2500000Z",
"updatedAt": "2021-12-31T08:20:48.3900000Z",
"createdAt": "2022-03-04T08:11:46.5300000Z",
"updatedAt": "2022-03-04T08:11:50.2100000Z",
"serviceBusEndpoint": "https://namespacexxx.servicebus.windows.net:443/",
"enabled": true,
"critical": false,
"zoneRedundant": false
"zoneRedundant": false,
"networkACLs": {}
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/1b2b34bf/providers/Microsoft.NotificationHubs/namespaces/namespacexxx",
"name": "namespacexxx",
Expand All @@ -384,25 +377,25 @@
"Authorization": "Sanitized",
"Connection": "keep-alive",
"Content-Length": "0",
"User-Agent": "azsdk-python-mgmt-notificationhubs/7.0.0 Python/3.8.8 (Windows-10-10.0.19041-SP0)",
"x-ms-client-request-id": "8fef700c-6a12-11ec-851c-70b5e82527ff"
"User-Agent": "azsdk-python-mgmt-notificationhubs/8.0.0 Python/3.9.10 (Windows-10-10.0.22000-SP0)",
"x-ms-client-request-id": "c643edd9-9b92-11ec-9413-d08e79139a4a"
},
"RequestBody": null,
"StatusCode": 204,
"ResponseHeaders": {
"api-supported-versions": "2014-09-01, 2016-03-01, 2017-04-01, 2020-01-01-preview",
"Cache-Control": "no-cache",
"Date": "Fri, 31 Dec 2021 08:20:53 GMT",
"Date": "Fri, 04 Mar 2022 08:11:54 GMT",
"Expires": "-1",
"Pragma": "no-cache",
"Server": "Kestrel",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"TrackingId": "0b60f087-1b87-4699-ace3-e4204106921b",
"TrackingId": "9b57d6ef-7b0a-4455-8d8f-9612fa21949f",
"X-Content-Type-Options": "nosniff",
"x-ms-correlation-request-id": "a39bbb92-3201-4243-a06e-a5fbf2920f5e",
"x-ms-correlation-request-id": "d04d566b-d8d3-4cca-b2ae-c1474a3867dc",
"x-ms-ratelimit-remaining-subscription-deletes": "14998",
"x-ms-request-id": "a39bbb92-3201-4243-a06e-a5fbf2920f5e",
"x-ms-routing-request-id": "SOUTHEASTASIA:20211231T082053Z:a39bbb92-3201-4243-a06e-a5fbf2920f5e"
"x-ms-request-id": "d04d566b-d8d3-4cca-b2ae-c1474a3867dc",
"x-ms-routing-request-id": "SOUTHEASTASIA:20220304T081155Z:d04d566b-d8d3-4cca-b2ae-c1474a3867dc"
},
"ResponseBody": null
}
Expand Down
Loading

0 comments on commit 10cfb95

Please sign in to comment.