From 01d482f958bd2300377434a1d6d95f346e701468 Mon Sep 17 00:00:00 2001 From: "Tong Xu (Wicresoft North America Ltd)" Date: Fri, 3 Sep 2021 12:56:42 +0800 Subject: [PATCH] update test.yaml --- sdk/eventhub/test-resources.json | 2 +- sdk/eventhub/tests.yml | 1 - .../azure-ai-formrecognizer/tests/test_copy_model.py | 4 ++-- sdk/formrecognizer/test-resources.json | 6 +++--- sdk/formrecognizer/tests.yml | 1 + sdk/search/tests.yml | 1 + sdk/servicebus/test-resources.json | 4 ++++ 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/sdk/eventhub/test-resources.json b/sdk/eventhub/test-resources.json index 3566eb9745f98..30ceb086997bc 100644 --- a/sdk/eventhub/test-resources.json +++ b/sdk/eventhub/test-resources.json @@ -168,7 +168,7 @@ }, "EVENT_HUB_HOSTNAME": { "type": "string", - "value": "[concat(variables('eventHubsNamespace'), '.servicebus.windows.net')]" + "value": "[concat(variables('eventHubsNamespace'), '.servicebus.chinacloudapi.cn')]" }, "EVENT_HUB_CONN_STR": { "type": "string", diff --git a/sdk/eventhub/tests.yml b/sdk/eventhub/tests.yml index 80f042b59ece9..d110fce2a6806 100644 --- a/sdk/eventhub/tests.yml +++ b/sdk/eventhub/tests.yml @@ -19,5 +19,4 @@ stages: AZURE_CLIENT_ID: $(EVENTHUB_CLIENT_ID) AZURE_TENANT_ID: $(EVENTHUB_TENANT_ID) AZURE_CLIENT_SECRET: $(EVENTHUB_CLIENT_SECRET) - AZURE_SUBSCRIPTION_ID: $(EVENTHUB_SUBSCRIPTION_ID) AZURE_COSMOS_CONN_STR: $(python-eventhub-livetest-cosmos-conn-str) \ No newline at end of file diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py index c38fc218d1a66..86efb24d10261 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py @@ -54,13 +54,13 @@ def test_copy_model_successful(self, client, formrecognizer_storage_container_sa @FormRecognizerPreparer() @GlobalClientPreparer() - def test_copy_model_fail(self, client, formrecognizer_storage_container_sas_url, formrecognizer_region, formrecognizer_resource_id): + def test_copy_model_fail(self, client, formrecognizer_storage_container_sas_url, formrecognizer_region='usgovarizona', formrecognizer_resource_id): poller = client.begin_training(formrecognizer_storage_container_sas_url, use_training_labels=False) model = poller.result() # give an incorrect region - target = client.get_copy_authorization(resource_region="eastus", resource_id=formrecognizer_resource_id) + target = client.get_copy_authorization(resource_region="usgovvirginia", resource_id=formrecognizer_resource_id) with pytest.raises(HttpResponseError) as e: poller = client.begin_copy_model(model.model_id, target=target) diff --git a/sdk/formrecognizer/test-resources.json b/sdk/formrecognizer/test-resources.json index c73e87d8bd3ed..8c98013ed839f 100644 --- a/sdk/formrecognizer/test-resources.json +++ b/sdk/formrecognizer/test-resources.json @@ -42,7 +42,7 @@ "description": "The application client secret used to run tests." } }, - "formRecognizerEndpointSuffix": { + "cognitiveServicesEndpointSuffix": { "defaultValue": ".cognitiveservices.azure.com/", "type": "String" }, @@ -56,7 +56,7 @@ }, "blobResourceId": { "type": "string", - "defaultValue": "[resourceId('2cd617ea-1866-46b1-90e3-fffb087ebf9b', 'TrainingData', 'Microsoft.Storage/storageAccounts', parameters('blobStorageAccount'))]" + "defaultValue": "[resourceId('TrainingData', 'Microsoft.Storage/storageAccounts', parameters('blobStorageAccount'))]" }, "trainingDataSasProperties": { "type": "object", @@ -150,7 +150,7 @@ "authorizationApiVersion": "2018-09-01-preview", "formRecognizerBaseName": "[concat('formrecognizer', parameters('baseName'))]", "formRecognizerApiVersion": "2017-04-18", - "azureFormRecognizerUrl": "[concat('https://', variables('formRecognizerBaseName'), parameters('formRecognizerEndpointSuffix'))]", + "azureFormRecognizerUrl": "[concat('https://', variables('formRecognizerBaseName'), parameters('cognitiveServicesEndpointSuffix'))]", "cognitiveServiceUserRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/a97b65f3-24c7-4388-baec-2e87135dc908')]" }, "resources": [ diff --git a/sdk/formrecognizer/tests.yml b/sdk/formrecognizer/tests.yml index 26875bb738a89..2bfc572f4ce5d 100644 --- a/sdk/formrecognizer/tests.yml +++ b/sdk/formrecognizer/tests.yml @@ -31,6 +31,7 @@ stages: China: SubscriptionConfiguration: $(sub-config-cn-test-resources) EnvVars: + AZURE_SUBSCRIPTION_ID: $(provisioner-subscription) 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) diff --git a/sdk/search/tests.yml b/sdk/search/tests.yml index 53741d9c1b41d..e3d1c2d91e5a6 100644 --- a/sdk/search/tests.yml +++ b/sdk/search/tests.yml @@ -7,6 +7,7 @@ stages: ServiceDirectory: search DeployArmTemplate: true SupportedClouds: 'Public,UsGov,China' + Clouds: 'Public,UsGov,China' EnvVars: AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) diff --git a/sdk/servicebus/test-resources.json b/sdk/servicebus/test-resources.json index e0025711becd3..5b1ff8c6c05a1 100644 --- a/sdk/servicebus/test-resources.json +++ b/sdk/servicebus/test-resources.json @@ -236,6 +236,10 @@ "SERVICE_BUS_SESSION_QUEUE_SAS_KEY":{ "type": "string", "value": "[listkeys(variables('sessionQueueAuthorizationRuleName'), variables('sbVersion')).primaryKey]" + }, + "RESOURCE_REGION": { + "type": "string", + "value": "[parameters('location')]" } } } \ No newline at end of file