Skip to content

Commit ab7a3c4

Browse files
authored
[communication] Live Testing - Introduce CloudConfig into test.yml (#18469)
* remove envVars, use cloudconfig * formatting, expose subscription id * update subconfig name * remove unused parameters/vars
1 parent 173607b commit ab7a3c4

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

sdk/communication/test-resources.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,24 @@
1818
"metadata": {
1919
"description": "The client OID to grant access to test resources."
2020
}
21+
},
22+
"tenantId": {
23+
"type": "string",
24+
"metadata": {
25+
"description": "The tenant id to which the application and resources belong."
26+
}
27+
},
28+
"testApplicationId": {
29+
"type": "string",
30+
"metadata": {
31+
"description": "The application client id used to run tests."
32+
}
33+
},
34+
"testApplicationSecret": {
35+
"type": "string",
36+
"metadata": {
37+
"description": "The application client secret used to run tests."
38+
}
2139
}
2240
},
2341
"variables": {
@@ -46,9 +64,21 @@
4664
}
4765
],
4866
"outputs": {
67+
"AZURE_TENANT_ID": {
68+
"type": "string",
69+
"value": "[parameters('tenantId')]"
70+
},
71+
"AZURE_CLIENT_ID": {
72+
"type": "string",
73+
"value": "[parameters('testApplicationId')]"
74+
},
75+
"AZURE_CLIENT_SECRET": {
76+
"type": "string",
77+
"value": "[parameters('testApplicationSecret')]"
78+
},
4979
"COMMUNICATION_CONNECTION_STRING": {
5080
"type": "string",
5181
"value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2020-08-20-preview').primaryConnectionString]"
5282
}
5383
}
54-
}
84+
}

sdk/communication/tests.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ stages:
2323
ServiceDirectory: communication
2424
DeployArmTemplate: true
2525
TestSamples: true
26-
EnvVars:
27-
AZURE_TEST_RUN_LIVE: 'true'
28-
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
29-
AZURE_SUBSCRIPTION_ID: $(acs-subscription-id)
30-
AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret)
31-
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
32-
AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING: $(communication-livetest-connection-string)
33-
AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER: $(communication-livetest-phone-number)
26+
CloudConfig:
27+
Public:
28+
SubscriptionConfigurations:
29+
- $(sub-config-azure-cloud-test-resources)
30+
- $(sub-config-communication-services-cloud-test-resources-common)
31+
- $(sub-config-communication-services-cloud-test-resources-python)
32+
Clouds: Public

0 commit comments

Comments
 (0)