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

[Communication] - SMS - Enabling SMS Live tests using Static Resources #17599

Merged
merged 5 commits into from
Nov 17, 2020
Merged
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
16 changes: 0 additions & 16 deletions sdk/communication/azure-communication-sms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,6 @@
<jacoco.min.branchcoverage>0.75</jacoco.min.branchcoverage>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<configuration>
<properties>
minnieliu marked this conversation as resolved.
Show resolved Hide resolved
<jacoco.min.linecoverage>0.75</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0.75</jacoco.min.branchcoverage>
</properties>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.azure</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void sendSmsRequestAsyncSingleNumberNoDeliveryReport(HttpClient httpClien
}

private SmsAsyncClient getTestSmsClient(HttpClient httpClient) {
return getSmsClientBuilder(httpClient)
return getSmsClientBuilderWithConnectionString(httpClient)
.buildAsyncClient();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void sendSmsRequestMalformedNumber(HttpClient httpClient) throws NoSuchAl

private SmsClient getTestSmsClient(HttpClient httpClient) {

return getSmsClientBuilder(httpClient)
return getSmsClientBuilderWithConnectionString(httpClient)
.buildClient();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
9 changes: 9 additions & 0 deletions sdk/communication/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@ 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_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)
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)