Skip to content

Commit

Permalink
[Communication] - Phone Numbers - Use static connection string in azu…
Browse files Browse the repository at this point in the history
…re-communication-phonenumber tests (#26775)

* Use static connection string in phonenumber tests

* Use static connection string for SIP tests
  • Loading branch information
danielortega-msft authored Oct 12, 2022
1 parent 6be8beb commit b950e8b
Show file tree
Hide file tree
Showing 25 changed files with 428 additions and 384 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ def setUp(self):
if self.is_playback():
self.connection_str = "endpoint=https://sanitized.communication.azure.com/;accesskey=fake==="
else:
self.connection_str = os.getenv('COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING') or \
os.getenv('COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING')
self.connection_str = os.getenv('COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING')
endpoint, _ = parse_connection_str(self.connection_str)
self._resource_name = endpoint.split(".")[0]
self.scrubber.register_name_pair(self._resource_name, "sanitized")
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
x-ms-date:
- Wed, 12 Jan 2022 16:24:18 GMT
- Wed, 12 Oct 2022 01:00:59 GMT
x-ms-return-client-request-id:
- 'true'
method: GET
uri: https://sanitized.communication.azure.com/phoneNumbers/sanitized?api-version=2022-01-11-preview2
response:
body:
string: '{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": "US",
"phoneNumberType": "tollFree", "capabilities": {"calling": "inbound", "sms":
"phoneNumberType": "tollFree", "capabilities": {"calling": "none", "sms":
"outbound"}, "assignmentType": "application", "purchaseDate": "2021-06-23T23:38:41.0997634+00:00",
"cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}}'
headers:
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01
content-type:
- application/json; charset=utf-8
date:
- Wed, 12 Jan 2022 16:24:17 GMT
- Wed, 12 Oct 2022 01:01:01 GMT
ms-cv:
- RUviUhanXUuedvHl+aoPpg.0
request-context:
- appId=
- CmoReVse+UaDMfLQ3HYBAQ.0
strict-transport-security:
- max-age=2592000
transfer-encoding:
- chunked
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 3192ms
- 1646ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
method: GET
uri: https://sanitized.communication.azure.com/phoneNumbers/sanitized?api-version=2022-01-11-preview2
response:
body:
string: '{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": "US",
"phoneNumberType": "tollFree", "capabilities": {"calling": "inbound", "sms":
"phoneNumberType": "tollFree", "capabilities": {"calling": "none", "sms":
"outbound"}, "assignmentType": "application", "purchaseDate": "2021-06-23T23:38:41.0997634+00:00",
"cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}}'
headers:
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01
content-type:
- application/json; charset=utf-8
date:
- Wed, 12 Jan 2022 16:24:22 GMT
- Wed, 12 Oct 2022 01:01:03 GMT
ms-cv:
- vyQH496Y/0OFVUm/apv27Q.0
request-context:
- appId=
- G0yrk9BudEKWDdQjKoMpgA.0
strict-transport-security:
- max-age=2592000
transfer-encoding:
- chunked
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 3489ms
- 1398ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
x-ms-date:
- Wed, 12 Jan 2022 16:24:27 GMT
- Wed, 12 Oct 2022 01:01:03 GMT
x-ms-return-client-request-id:
- 'true'
method: GET
Expand All @@ -22,21 +22,21 @@ interactions:
cannot be found.", "target": "phonenumber"}}'
headers:
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01
content-type:
- application/json
date:
- Wed, 12 Jan 2022 16:24:25 GMT
- Wed, 12 Oct 2022 01:01:04 GMT
ms-cv:
- eRnvsvQ0s0ymZOrVnZ56wQ.0
request-context:
- appId=
- /gpFm/xhKEKUwge+13cKKQ.0
strict-transport-security:
- max-age=2592000
transfer-encoding:
- chunked
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 1712ms
- 664ms
status:
code: 404
message: Not Found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
x-ms-date:
- Wed, 12 Jan 2022 16:24:30 GMT
- Wed, 12 Oct 2022 01:01:04 GMT
x-ms-return-client-request-id:
- 'true'
method: GET
Expand Down Expand Up @@ -199,7 +199,7 @@ interactions:
"assignmentType": "application", "purchaseDate": "2021-06-23T23:41:22.1720088+00:00",
"cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}},
{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": "US", "phoneNumberType":
"tollFree", "capabilities": {"calling": "inbound", "sms": "outbound"}, "assignmentType":
"tollFree", "capabilities": {"calling": "none", "sms": "outbound"}, "assignmentType":
"application", "purchaseDate": "2021-06-23T23:38:41.0997634+00:00", "cost":
{"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}}, {"id":
"sanitized", "phoneNumber": "sanitized", "countryCode": "US", "phoneNumberType":
Expand Down Expand Up @@ -421,21 +421,21 @@ interactions:
"nextLink": "/phoneNumbers?skip=100&top=100&api-version=2022-01-11-preview2"}'
headers:
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01
content-type:
- application/json; charset=utf-8
date:
- Wed, 12 Jan 2022 16:24:31 GMT
- Wed, 12 Oct 2022 01:01:09 GMT
ms-cv:
- uncxAwNo6UCrwN7VxlhXCQ.0
request-context:
- appId=
- mBVgKYRrpEmdgx61MQF9xQ.0
strict-transport-security:
- max-age=2592000
transfer-encoding:
- chunked
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 4822ms
- 4322ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
method: GET
uri: https://sanitized.communication.azure.com/phoneNumbers?skip=0&top=100&api-version=2022-01-11-preview2
response:
Expand Down Expand Up @@ -195,7 +195,7 @@ interactions:
"assignmentType": "application", "purchaseDate": "2021-06-23T23:41:22.1720088+00:00",
"cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}},
{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": "US", "phoneNumberType":
"tollFree", "capabilities": {"calling": "inbound", "sms": "outbound"}, "assignmentType":
"tollFree", "capabilities": {"calling": "none", "sms": "outbound"}, "assignmentType":
"application", "purchaseDate": "2021-06-23T23:38:41.0997634+00:00", "cost":
{"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}}, {"id":
"sanitized", "phoneNumber": "sanitized", "countryCode": "US", "phoneNumberType":
Expand Down Expand Up @@ -417,21 +417,21 @@ interactions:
"nextLink": "/phoneNumbers?skip=100&top=100&api-version=2022-01-11-preview2"}'
headers:
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01
content-type:
- application/json; charset=utf-8
date:
- Wed, 12 Jan 2022 16:24:40 GMT
- Wed, 12 Oct 2022 01:01:15 GMT
ms-cv:
- WlkpBqUX40yEpeTVct8OPg.0
request-context:
- appId=
- SXSxZMQlL0ezI0szYhCEvg.0
strict-transport-security:
- max-age=2592000
transfer-encoding:
- chunked
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 7286ms
- 5185ms
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
x-ms-date:
- Wed, 12 Jan 2022 16:24:45 GMT
- Wed, 12 Oct 2022 01:01:14 GMT
x-ms-return-client-request-id:
- 'true'
method: POST
Expand All @@ -28,25 +28,25 @@ interactions:
access-control-expose-headers:
- Location,Operation-Location,operation-id,search-id
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01
content-length:
- '0'
date:
- Wed, 12 Jan 2022 16:24:47 GMT
- Wed, 12 Oct 2022 01:01:35 GMT
ms-cv:
- 8tw5TPAY2UWd5E7y6FEjKQ.0
- Lija3zCczEWL9xrP1DQopQ.0
operation-id:
- search_e1784c92-5251-4e28-af6c-8a7566d6cd33
- search_2553f1fa-fdf2-40d9-b3aa-d867515b04b7
operation-location:
- /phoneNumbers/operations/search_e1784c92-5251-4e28-af6c-8a7566d6cd33?api-version=2022-01-11-preview2
request-context:
- appId=
- /phoneNumbers/operations/search_2553f1fa-fdf2-40d9-b3aa-d867515b04b7?api-version=2022-01-11-preview2
search-id:
- e1784c92-5251-4e28-af6c-8a7566d6cd33
- 2553f1fa-fdf2-40d9-b3aa-d867515b04b7
strict-transport-security:
- max-age=2592000
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 4862ms
- 20599ms
status:
code: 202
message: Accepted
Expand All @@ -60,38 +60,38 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
x-ms-date:
- Wed, 12 Jan 2022 16:25:21 GMT
- Wed, 12 Oct 2022 01:02:05 GMT
x-ms-return-client-request-id:
- 'true'
method: GET
uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_e1784c92-5251-4e28-af6c-8a7566d6cd33?api-version=2022-01-11-preview2
uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_2553f1fa-fdf2-40d9-b3aa-d867515b04b7?api-version=2022-01-11-preview2
response:
body:
string: '{"operationType": "search", "status": "succeeded", "resourceLocation":
"/availablePhoneNumbers/searchResults/e1784c92-5251-4e28-af6c-8a7566d6cd33?api-version=2022-01-11-preview2",
"createdDateTime": "2022-01-12T16:24:46.0297367+00:00", "id": "sanitized",
"/availablePhoneNumbers/searchResults/2553f1fa-fdf2-40d9-b3aa-d867515b04b7?api-version=2022-01-11-preview2",
"createdDateTime": "2022-10-12T01:01:35.4752168+00:00", "id": "sanitized",
"lastActionDateTime": "0001-01-01T00:00:00+00:00"}'
headers:
access-control-expose-headers:
- Location
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-11-15-preview, 2022-12-01
content-type:
- application/json; charset=utf-8
date:
- Wed, 12 Jan 2022 16:25:18 GMT
- Wed, 12 Oct 2022 01:02:06 GMT
ms-cv:
- ChuaJbw9x0aeoEex20Zetg.0
request-context:
- appId=
- GBk8bcqy20+tx4hDyTjYaA.0
strict-transport-security:
- max-age=2592000
transfer-encoding:
- chunked
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 1361ms
- 628ms
status:
code: 200
message: OK
Expand All @@ -106,37 +106,37 @@ interactions:
Connection:
- keep-alive
User-Agent:
- azsdk-python-communication-phonenumbers/1.0.2 Python/3.9.9 (Windows-10-10.0.22000-SP0)
- azsdk-python-communication-phonenumbers/1.1.0b3 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29)
x-ms-date:
- Wed, 12 Jan 2022 16:25:23 GMT
- Wed, 12 Oct 2022 01:02:06 GMT
x-ms-return-client-request-id:
- 'true'
method: GET
uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/e1784c92-5251-4e28-af6c-8a7566d6cd33?api-version=2022-01-11-preview2
uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/2553f1fa-fdf2-40d9-b3aa-d867515b04b7?api-version=2022-01-11-preview2
response:
body:
string: '{"searchId": "e1784c92-5251-4e28-af6c-8a7566d6cd33", "phoneNumbers":
string: '{"searchId": "2553f1fa-fdf2-40d9-b3aa-d867515b04b7", "phoneNumbers":
["sanitized"], "phoneNumberType": "tollFree", "assignmentType": "application",
"capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost":
{"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy":
"2022-01-12T16:40:52.5420073+00:00"}'
"2022-10-12T01:17:39.3633663+00:00"}'
headers:
api-supported-versions:
- 2021-03-07, 2022-01-11-preview2
- 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01
content-type:
- application/json; charset=utf-8
date:
- Wed, 12 Jan 2022 16:25:20 GMT
- Wed, 12 Oct 2022 01:02:08 GMT
ms-cv:
- pNLF2RdqV0ybtZdMisqs5g.0
request-context:
- appId=
- IODqCCYl9Uuzj/VUceDsQw.0
strict-transport-security:
- max-age=2592000
transfer-encoding:
- chunked
x-cache:
- CONFIG_NOCACHE
x-processing-time:
- 1946ms
- 1835ms
status:
code: 200
message: OK
Expand Down
Loading

0 comments on commit b950e8b

Please sign in to comment.