Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
42 changes: 42 additions & 0 deletions sdk/communication/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,37 @@
"defaultValue": "communication",
"type": "string"
},
"communicationServicesEndpointSuffix": {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not needed in .net.

"defaultValue": ".communication.azure.com",
"type": "string"
},
"subscriptionId": {
"defaultValue": "[subscription().subscriptionId]",
"type": "string"
},
"testApplicationOid": {
"type": "string",
"metadata": {
"description": "The client OID to grant access to test resources."
}
},
"tenantId": {
"type": "String",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String should be lowercase, there's a couple spots where this needs to be done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

"metadata": {
"description": "The tenant id to which the application and resources belong."
}
},
"testApplicationId": {
"type": "String",
"metadata": {
"description": "The application client id used to run tests."
}
},
"testApplicationSecret": {
"type": "String",
"metadata": {
"description": "The application client secret used to run tests."
}
}
},
"variables": {
Expand Down Expand Up @@ -46,10 +72,26 @@
}
],
"outputs": {
"AZURE_TENANT_ID": {
"type": "string",
"value": "[parameters('tenantId')]"
},
"AZURE_CLIENT_ID": {
"type": "string",
"value": "[parameters('testApplicationId')]"
},
"AZURE_CLIENT_SECRET": {
"type": "string",
"value": "[parameters('testApplicationSecret')]"
},
"COMMUNICATION_CONNECTION_STRING": {
"type": "string",
"value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2020-08-20-preview').primaryConnectionString]"
},
"COMMUNICATION_SERVICE_ENDPOINT": {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not needed in .net

"type": "string",
"value": "[concat('https://', parameters('baseName'), '-', parameters('endpointPrefix'), parameters('communicationServicesEndpointSuffix'))]"
},
"RESOURCE_GROUP_NAME": {
"type": "string",
"value": "[resourceGroup().Name]"
Expand Down
14 changes: 6 additions & 8 deletions sdk/communication/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: communication
Clouds: ACS_Public
CloudConfig:
ACS_Public:
SubscriptionConfiguration: $(sub-config-communication-services-cloud-test-resources)
Public:
SubscriptionConfigurations:
- $(sub-config-azure-cloud-test-resources)
- $(sub-config-communication-services-cloud-test-resources-test)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suggest rename this to something like sub-config-communication-services-cloud-test-resources-common

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to change the keyvault and the variable name first right?

- $(sub-config-communication-services-cloud-test-resources-net)
Clouds: Public
EnvVars:
AZURE_TENANT_ID: $(COMMUNICATION_TENANT_ID)
AZURE_CLIENT_ID: $(COMMUNICATION_CLIENT_ID)
AZURE_CLIENT_SECRET: $(COMMUNICATION_CLIENT_SECRET)
AZURE_COMMUNICATION_LIVETEST_CONNECTION_STRING: $(communication-livetest-connection-string)
AZURE_PHONE_NUMBER: $(net-communication-livetest-phone-number)
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
SKIP_PHONENUMBER_LIVE_TESTS: TRUE
TEST_PACKAGES_ENABLED: ${{ parameters.TestPackagesEnabled }}