From 35b15c8e3174d2e9f35b8528669cb24b3b7dd1b5 Mon Sep 17 00:00:00 2001 From: Bert Ong <823691+beltr0n@users.noreply.github.com> Date: Fri, 30 Apr 2021 15:59:31 -0700 Subject: [PATCH 1/4] remove envVars, use cloudconfig --- sdk/communication/test-resources.json | 44 ++++++++++++++++++++++++++- sdk/communication/tests.yml | 15 +++++---- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/sdk/communication/test-resources.json b/sdk/communication/test-resources.json index 2875b36ca191..d437b14c2c73 100644 --- a/sdk/communication/test-resources.json +++ b/sdk/communication/test-resources.json @@ -13,11 +13,37 @@ "defaultValue": "communication", "type": "string" }, + "communicationServicesEndpointSuffix": { + "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", + "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": { @@ -46,9 +72,25 @@ } ], "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": { + "type": "string", + "value": "[concat('https://', parameters('baseName'), '-', parameters('endpointPrefix'), parameters('communicationServicesEndpointSuffix'))]" + } } } diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index 15814c81357f..ea3cd007dbe0 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -23,11 +23,10 @@ stages: ServiceDirectory: communication DeployArmTemplate: true TestSamples: true - EnvVars: - AZURE_TEST_RUN_LIVE: 'true' - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_SUBSCRIPTION_ID: $(acs-subscription-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING: $(communication-livetest-connection-string) - AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER: $(communication-livetest-phone-number) + CloudConfig: + Public: + SubscriptionConfigurations: + - $(sub-config-azure-cloud-test-resources) + - $(sub-config-communication-services-cloud-test-resources-test) + - $(sub-config-communication-services-cloud-test-resources-python) + Clouds: Public From b666633c40ec5430b4c4e65752a0bf6363525923 Mon Sep 17 00:00:00 2001 From: Bert Ong <823691+beltr0n@users.noreply.github.com> Date: Fri, 30 Apr 2021 17:20:07 -0700 Subject: [PATCH 2/4] formatting, expose subscription id --- sdk/communication/test-resources.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/communication/test-resources.json b/sdk/communication/test-resources.json index d437b14c2c73..47b69a7c2db1 100644 --- a/sdk/communication/test-resources.json +++ b/sdk/communication/test-resources.json @@ -17,10 +17,10 @@ "defaultValue": ".communication.azure.com", "type": "string" }, - "subscriptionId": { + "subscriptionId": { "defaultValue": "[subscription().subscriptionId]", "type": "string" - }, + }, "testApplicationOid": { "type": "string", "metadata": { @@ -72,6 +72,10 @@ } ], "outputs": { + "AZURE_SUBSCRIPTION_ID": { + "type": "string", + "value": "[parameters('subscriptionId')]" + }, "AZURE_TENANT_ID": { "type": "string", "value": "[parameters('tenantId')]" From e3f7dc8abdedcef5b8dcdcdafacceff127483463 Mon Sep 17 00:00:00 2001 From: Bert Ong <823691+beltr0n@users.noreply.github.com> Date: Fri, 30 Apr 2021 18:57:56 -0700 Subject: [PATCH 3/4] update subconfig name --- sdk/communication/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/tests.yml b/sdk/communication/tests.yml index ea3cd007dbe0..7cb0762c8b20 100644 --- a/sdk/communication/tests.yml +++ b/sdk/communication/tests.yml @@ -27,6 +27,6 @@ stages: Public: SubscriptionConfigurations: - $(sub-config-azure-cloud-test-resources) - - $(sub-config-communication-services-cloud-test-resources-test) + - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-python) Clouds: Public From 14f79688d8db922e9f9ffaf7d95869c6be57a010 Mon Sep 17 00:00:00 2001 From: Bert Ong <823691+beltr0n@users.noreply.github.com> Date: Mon, 3 May 2021 18:02:49 -0700 Subject: [PATCH 4/4] remove unused parameters/vars --- sdk/communication/test-resources.json | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/sdk/communication/test-resources.json b/sdk/communication/test-resources.json index 47b69a7c2db1..b8553cb82f5e 100644 --- a/sdk/communication/test-resources.json +++ b/sdk/communication/test-resources.json @@ -13,14 +13,6 @@ "defaultValue": "communication", "type": "string" }, - "communicationServicesEndpointSuffix": { - "defaultValue": ".communication.azure.com", - "type": "string" - }, - "subscriptionId": { - "defaultValue": "[subscription().subscriptionId]", - "type": "string" - }, "testApplicationOid": { "type": "string", "metadata": { @@ -72,10 +64,6 @@ } ], "outputs": { - "AZURE_SUBSCRIPTION_ID": { - "type": "string", - "value": "[parameters('subscriptionId')]" - }, "AZURE_TENANT_ID": { "type": "string", "value": "[parameters('tenantId')]" @@ -91,10 +79,6 @@ "COMMUNICATION_CONNECTION_STRING": { "type": "string", "value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2020-08-20-preview').primaryConnectionString]" - }, - "COMMUNICATION_SERVICE_ENDPOINT": { - "type": "string", - "value": "[concat('https://', parameters('baseName'), '-', parameters('endpointPrefix'), parameters('communicationServicesEndpointSuffix'))]" - } + } } -} +} \ No newline at end of file