Skip to content

Commit

Permalink
update test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
v-xuto committed Sep 23, 2021
1 parent 26a03e3 commit 01d482f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sdk/eventhub/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions sdk/formrecognizer/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"description": "The application client secret used to run tests."
}
},
"formRecognizerEndpointSuffix": {
"cognitiveServicesEndpointSuffix": {
"defaultValue": ".cognitiveservices.azure.com/",
"type": "String"
},
Expand All @@ -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",
Expand Down Expand Up @@ -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": [
Expand Down
1 change: 1 addition & 0 deletions sdk/formrecognizer/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions sdk/search/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions sdk/servicebus/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -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')]"
}
}
}

0 comments on commit 01d482f

Please sign in to comment.