From bd1b4ea8e895a8d7f9b786904f8c843d59dfc05f Mon Sep 17 00:00:00 2001 From: Minnie Liu Date: Mon, 16 Nov 2020 14:57:37 -0800 Subject: [PATCH 1/5] Enabling SMS Live tests --- .../azure/communication/sms/SmsLiveAsyncClientTests.java | 2 +- .../com/azure/communication/sms/SmsLiveClientTests.java | 2 +- sdk/communication/tests.yml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveAsyncClientTests.java b/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveAsyncClientTests.java index 7cd0cbeb23f7e..2f3e0395f8571 100644 --- a/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveAsyncClientTests.java +++ b/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveAsyncClientTests.java @@ -76,7 +76,7 @@ public void sendSmsRequestAsyncSingleNumberNoDeliveryReport(HttpClient httpClien } private SmsAsyncClient getTestSmsClient(HttpClient httpClient) { - return getSmsClientBuilder(httpClient) + return getSmsClientBuilderWithConnectionString(httpClient) .buildAsyncClient(); } } diff --git a/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveClientTests.java b/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveClientTests.java index 1cf97cdc6fb9d..743f795a281a4 100644 --- a/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveClientTests.java +++ b/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveClientTests.java @@ -126,7 +126,7 @@ public void sendSmsRequestMalformedNumber(HttpClient httpClient) throws NoSuchAl private SmsClient getTestSmsClient(HttpClient httpClient) { - return getSmsClientBuilder(httpClient) + return getSmsClientBuilderWithConnectionString(httpClient) .buildClient(); } } diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index a435579fb1403..e97af2eb1e824 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -10,9 +10,15 @@ jobs: - name: azure-communication-chat groupId: com.azure safeName: azurecommunicationchat + - name: azure-communication-sms + groupId: com.azure + safeName: azurecommunicationsms ServiceDirectory: communication EnvVars: AZURE_TEST_MODE: LIVE SKIP_PHONENUMBER_INTEGRATION_TESTS: TRUE SKIP_LIVE_TEST: TRUE + AZURE_SUBSCRIPTION_ID: $(acs-subscription-id) + COMMUNICATION_CONNECTION_STRING: $(communication-livetest-connection-string) + SMS_SERVICE_PHONE_NUMBER: $(communication-livetest-phone-number) From 078e793127e1d3f98b00d2bbea6edb4d32db0a0b Mon Sep 17 00:00:00 2001 From: Minnie Liu Date: Mon, 16 Nov 2020 15:01:17 -0800 Subject: [PATCH 2/5] Clean up --- sdk/communication/azure-communication-sms/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdk/communication/azure-communication-sms/pom.xml b/sdk/communication/azure-communication-sms/pom.xml index a725d84a808ec..57d5227293ceb 100644 --- a/sdk/communication/azure-communication-sms/pom.xml +++ b/sdk/communication/azure-communication-sms/pom.xml @@ -52,10 +52,6 @@ jacoco-maven-plugin 0.8.5 - - 0.75 - 0.75 - From 8841773878d14bbbbf1aa16e8ef4e0d8489ec104 Mon Sep 17 00:00:00 2001 From: Minnie Liu Date: Mon, 16 Nov 2020 15:42:04 -0800 Subject: [PATCH 3/5] Adding more variables --- sdk/communication/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index e97af2eb1e824..55b8b36a8c395 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -20,5 +20,8 @@ jobs: SKIP_LIVE_TEST: TRUE AZURE_SUBSCRIPTION_ID: $(acs-subscription-id) COMMUNICATION_CONNECTION_STRING: $(communication-livetest-connection-string) - SMS_SERVICE_PHONE_NUMBER: $(communication-livetest-phone-number) + SMS_SERVICE_PHONE_NUMBER: $(communication-livetest-phone-number) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) From 5810df8c674c10cc9cd80f0597eb614e42d1df7a Mon Sep 17 00:00:00 2001 From: Minnie Liu Date: Mon, 16 Nov 2020 16:05:21 -0800 Subject: [PATCH 4/5] Fix SMS live test --- .../test/java/com/azure/communication/sms/SmsLiveTestBase.java | 2 +- sdk/communication/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveTestBase.java b/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveTestBase.java index 3fbcde526928d..d81dc10bae3ff 100644 --- a/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveTestBase.java +++ b/sdk/communication/azure-communication-sms/src/test/java/com/azure/communication/sms/SmsLiveTestBase.java @@ -30,7 +30,7 @@ public class SmsLiveTestBase extends TestBase { .get("SMS_SERVICE_ENDPOINT", "https://REDACTED.communication.azure.com"); static final String CONNECTION_STRING = Configuration.getGlobalConfiguration() - .get("COMMUNICATION_CONNECTION_STRING", "endpoint=https://REDACTED.communication.azure.com/;accesskey=VGhpcyBpcyBhIHRlc3Q="); + .get("COMMUNICATION_LIVETEST_CONNECTION_STRING", "endpoint=https://REDACTED.communication.azure.com/;accesskey=VGhpcyBpcyBhIHRlc3Q="); protected SmsClientBuilder getSmsClientBuilder(HttpClient httpClient) { SmsClientBuilder builder = new SmsClientBuilder(); diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index 55b8b36a8c395..8b57bf8685cc4 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -19,7 +19,7 @@ jobs: SKIP_PHONENUMBER_INTEGRATION_TESTS: TRUE SKIP_LIVE_TEST: TRUE AZURE_SUBSCRIPTION_ID: $(acs-subscription-id) - COMMUNICATION_CONNECTION_STRING: $(communication-livetest-connection-string) + COMMUNICATION_LIVETEST_CONNECTION_STRING: $(communication-livetest-connection-string) SMS_SERVICE_PHONE_NUMBER: $(communication-livetest-phone-number) AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) From eaf5af003e3fcaf664c939cb2381cffc21aff2e0 Mon Sep 17 00:00:00 2001 From: Minnie Liu Date: Mon, 16 Nov 2020 16:19:59 -0800 Subject: [PATCH 5/5] Clean up unneeded module from SMS pom --- sdk/communication/azure-communication-sms/pom.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/sdk/communication/azure-communication-sms/pom.xml b/sdk/communication/azure-communication-sms/pom.xml index 57d5227293ceb..7007b93f9e7aa 100644 --- a/sdk/communication/azure-communication-sms/pom.xml +++ b/sdk/communication/azure-communication-sms/pom.xml @@ -45,18 +45,6 @@ 0.75 - - - - org.jacoco - jacoco-maven-plugin - 0.8.5 - - - - - - com.azure