Skip to content

Commit 24b00af

Browse files
Gfeitosa/enable int improve coverage (Azure#32792)
* Add int environment to test scope * Fix int test pipeline configuration file name * Add coverace config to sms package * Remove sms/_shared files from global coverage report * Update livetest pipeline to use sms specific configuration for int environment * Implement extra sms client tests * Implement extra sms client async tests * Replace connection string environment variable name to be more consistent with other SDKs
1 parent 6a57993 commit 24b00af

14 files changed

+44
-12
lines changed

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ exclude_lines =
2323
omit =
2424
*/test*
2525
env*
26-
*/_serialization.py
26+
*/_serialization.py
27+
*/sms/_shared/*

eng/tox/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pkgs =
4848

4949
[pytest]
5050
ignore_args=--ignore=.tox --ignore=build --ignore=.eggs
51-
default_args = -rsfE --junitxml={tox_root}/test-junit-{envname}.xml --verbose --durations=10 --ignore=azure {[pytest]ignore_args}
51+
default_args = -rsfE --junitxml={tox_root}/test-junit-{envname}.xml --verbose --cov-branch --durations=10 --ignore=azure {[pytest]ignore_args}
5252

5353
[testenv]
5454
parallel_show_output =True

sdk/communication/azure-communication-sms/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
mypy = false
33
pyright = false
44
type_check_samples = false
5-
verifytypes = false
5+
verifytypes = false

sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class SmsMultipleRecipientsSample(object):
2828

29-
connection_string = os.getenv("COMMUNICATION_SMS_LIVETEST_DYNAMIC_CONNECTION_STRING")
29+
connection_string = os.getenv("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING")
3030
phone_number = os.getenv("SMS_PHONE_NUMBER")
3131

3232
def send_sms_to_multiple_recipients(self):

sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
class SmsMultipleRecipientsSampleAsync(object):
2929

30-
connection_string = os.getenv("COMMUNICATION_SMS_LIVETEST_DYNAMIC_CONNECTION_STRING")
30+
connection_string = os.getenv("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING")
3131
phone_number = os.getenv("SMS_PHONE_NUMBER")
3232

3333
async def send_sms_to_multiple_recipients_async(self):

sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class SmsSingleRecipientSample(object):
2828

29-
connection_string = os.getenv("COMMUNICATION_SMS_LIVETEST_DYNAMIC_CONNECTION_STRING")
29+
connection_string = os.getenv("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING")
3030
phone_number = os.getenv("SMS_PHONE_NUMBER")
3131

3232
def send_sms_to_single_recipient(self):

sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
class SmsSingleRecipientSampleAsync(object):
2929

30-
connection_string = os.getenv("COMMUNICATION_SMS_LIVETEST_DYNAMIC_CONNECTION_STRING")
30+
connection_string = os.getenv("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING")
3131
phone_number = os.getenv("SMS_PHONE_NUMBER")
3232

3333
async def send_sms_to_single_recipient_async(self):

sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
class SmsTokenCredentialAuthSample(object):
3030

31-
connection_string = os.getenv("COMMUNICATION_SMS_LIVETEST_DYNAMIC_CONNECTION_STRING")
31+
connection_string = os.getenv("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING")
3232
phone_number = os.getenv("SMS_PHONE_NUMBER")
3333

3434
def sms_token_credential_auth(self):

sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
class SmsTokenCredentialAuthSampleAsync(object):
3131

32-
connection_string = os.getenv("COMMUNICATION_SMS_LIVETEST_DYNAMIC_CONNECTION_STRING")
32+
connection_string = os.getenv("COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING")
3333
phone_number = os.getenv("SMS_PHONE_NUMBER")
3434

3535
async def sms_token_credential_auth_async(self):

sdk/communication/azure-communication-sms/tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ stages:
66
BuildTargetingString: 'azure-communication-sms'
77
JobName: sms
88
ServiceDirectory: communication
9+
Clouds: Public,Int
910
CloudConfig:
1011
Public:
1112
SubscriptionConfigurations:
@@ -14,7 +15,11 @@ stages:
1415
- $(sub-config-communication-services-sms-cloud-test-resources)
1516
MatrixReplace:
1617
- TestSamples=.*/true
17-
Clouds: Public
18+
Int:
19+
SubscriptionConfigurations:
20+
- $(sub-config-communication-int-test-resources-common)
21+
- $(sub-config-communication-int-test-resources-python)
22+
- $(sub-config-communication-sms-int-test-resources)
1823
EnvVars:
1924
AZURE_SKIP_LIVE_RECORDING: 'True'
2025
AZURE_TEST_RUN_LIVE: 'True'

0 commit comments

Comments
 (0)