From 6c92c6a88f842c6dd29022744942ff813459fc1c Mon Sep 17 00:00:00 2001 From: turalf Date: Tue, 10 Nov 2020 11:14:45 -0800 Subject: [PATCH 1/5] Replace subscription to acs --- sdk/communication/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index 571848a9c2b4..bfa5120bd5b4 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -9,7 +9,7 @@ jobs: EnvVars: AZURE_TEST_RUN_LIVE: 'true' AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_SUBSCRIPTION_ID: $(azure-subscription-id) + AZURE_SUBSCRIPTION_ID: $(acs-subscription-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING: $(python-communication-connection-string) From 1d5167fea0ce1328bcbb239f194cf9b5512e60f5 Mon Sep 17 00:00:00 2001 From: turalf Date: Thu, 12 Nov 2020 13:01:37 -0800 Subject: [PATCH 2/5] Enable sms e2e tests for sync client --- .../azure-communication-sms/tests/test_sms_client_e2e.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py index 577de40d28a2..aa61ade9e6a2 100644 --- a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py +++ b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py @@ -15,7 +15,7 @@ ResponseReplacerProcessor ) -SKIP_PHONE_NUMBER_TESTS = True +SKIP_PHONE_NUMBER_TESTS = False PHONE_NUMBER_TEST_SKIP_REASON= "Phone Number infra for live tests not ready yet" class SMSClientTest(CommunicationTestCase): From 51eddef2e442eeec4c3d66ca3136fdb8a6fc8922 Mon Sep 17 00:00:00 2001 From: turalf Date: Thu, 12 Nov 2020 14:36:10 -0800 Subject: [PATCH 3/5] Change the env var name in the test code --- .../azure-communication-sms/tests/test_sms_client_e2e.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py index aa61ade9e6a2..7256c6c56764 100644 --- a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py +++ b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py @@ -28,7 +28,7 @@ def setUp(self): if self.is_playback(): self.phone_number = "+18000005555" else: - self.phone_number = os.getenv("PHONE_NUMBER") + self.phone_number = os.getenv("AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER") self.recording_processors.extend([ BodyReplacerProcessor(keys=["to", "from", "messageId"]), From 5f6e268fcfd6a3de78b36e7a40cdd6f94b9e1f0b Mon Sep 17 00:00:00 2001 From: turalf Date: Fri, 13 Nov 2020 10:25:18 -0800 Subject: [PATCH 4/5] Replace var names in tests.yml --- sdk/communication/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index bfa5120bd5b4..cc8a08643902 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -12,5 +12,5 @@ jobs: AZURE_SUBSCRIPTION_ID: $(acs-subscription-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING: $(python-communication-connection-string) - AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER: $(python-communication-phone-number) \ No newline at end of file + AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING: $(communication-livetest-connection-string) + AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER: $(communication-livetest-phone-number) \ No newline at end of file From 7322a04cb706c9c6515eda0acb8412963743c682 Mon Sep 17 00:00:00 2001 From: turalf Date: Fri, 13 Nov 2020 10:26:46 -0800 Subject: [PATCH 5/5] Enable sms tests --- .../azure-communication-sms/tests/test_sms_client_e2e.py | 4 ---- .../tests/test_sms_client_e2e_async.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py index 7256c6c56764..922d2e3e9aa9 100644 --- a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py +++ b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e.py @@ -15,9 +15,6 @@ ResponseReplacerProcessor ) -SKIP_PHONE_NUMBER_TESTS = False -PHONE_NUMBER_TEST_SKIP_REASON= "Phone Number infra for live tests not ready yet" - class SMSClientTest(CommunicationTestCase): def __init__(self, method_name): super(SMSClientTest, self).__init__(method_name) @@ -37,7 +34,6 @@ def setUp(self): self.sms_client = SmsClient.from_connection_string(self.connection_str) @pytest.mark.live_test_only - @pytest.mark.skipif(SKIP_PHONE_NUMBER_TESTS, reason=PHONE_NUMBER_TEST_SKIP_REASON) def test_send_sms(self): # calling send() with sms values diff --git a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e_async.py b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e_async.py index ed3528594452..47f94bcada9b 100644 --- a/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e_async.py +++ b/sdk/communication/azure-communication-sms/tests/test_sms_client_e2e_async.py @@ -15,9 +15,6 @@ BodyReplacerProcessor, ResponseReplacerProcessor ) -SKIP_PHONE_NUMBER_TESTS = True -PHONE_NUMBER_TEST_SKIP_REASON= "Phone Number infra for live tests not ready yet" - class SMSClientTestAsync(AsyncCommunicationTestCase): def __init__(self, method_name): super(SMSClientTestAsync, self).__init__(method_name) @@ -36,7 +33,6 @@ def setUp(self): @AsyncCommunicationTestCase.await_prepared_test @pytest.mark.live_test_only - @pytest.mark.skipif(SKIP_PHONE_NUMBER_TESTS, reason=PHONE_NUMBER_TEST_SKIP_REASON) async def test_send_sms_async(self): sms_client = SmsClient.from_connection_string(self.connection_str)