diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/tests/DataProtectionBlobFunctionalTests.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/tests/DataProtectionBlobFunctionalTests.cs index f7f10367b8682..b0f5c50dcc860 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/tests/DataProtectionBlobFunctionalTests.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/tests/DataProtectionBlobFunctionalTests.cs @@ -55,7 +55,7 @@ public async Task CanAddKeysIndependently() private async Task GetBlobClient(string name) { var client = new BlobServiceClient( - new Uri($"https://{TestEnvironment.StorageAccountName}.blob.core.windows.net/"), + new Uri($"https://{TestEnvironment.StorageAccountName}.blob.{TestEnvironment.StorageEndpointSuffix}/"), new StorageSharedKeyCredential( TestEnvironment.StorageAccountName, TestEnvironment.StorageAccountKey)); @@ -67,4 +67,4 @@ private async Task GetBlobClient(string name) return blobClient; } } -} \ No newline at end of file +} diff --git a/sdk/extensions/test-resources.json b/sdk/extensions/test-resources.json index 905a577c005d5..838b087b8172c 100644 --- a/sdk/extensions/test-resources.json +++ b/sdk/extensions/test-resources.json @@ -41,10 +41,24 @@ "metadata": { "description": "The location of the resource. By default, this is the same as the resource group." } + }, + "keyVaultEndpointSuffix": { + "defaultValue": ".vault.azure.net", + "type": "string", + "metadata": { + "description": "Endpoint suffix for sovereign clouds, requies the preceeding '.'. The default uses the public Azure Cloud (.vault.azure.net)" + } + }, + "keyVaultSku": { + "type": "string", + "defaultValue": "premium", + "metadata": { + "description": "Key Vault SKU to deploy. The default is 'premium'" + } } }, "variables": { - "azureKeyVaultUrl": "[format('https://{0}.vault.azure.net', parameters('baseName'))]", + "azureKeyVaultUrl": "[format('https://{0}{1}', parameters('baseName'), parameters('keyVaultEndpointSuffix'))]", "mgmtApiVersion": "2019-04-01", "blobAccountName": "[parameters('baseName')]" }, @@ -57,7 +71,7 @@ "properties": { "sku": { "family": "A", - "name": "premium" + "name": "[parameters('keyVaultSku')]" }, "tenantId": "[parameters('tenantId')]", "accessPolicies": [ diff --git a/sdk/extensions/tests.yml b/sdk/extensions/tests.yml index fe008f3e60ecf..c318ec4e74ea7 100644 --- a/sdk/extensions/tests.yml +++ b/sdk/extensions/tests.yml @@ -4,3 +4,4 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: extensions + Clouds: 'Public,Preview,UsGov,China' diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs index 2db5dfdeb0b95..fecd16047e916 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs @@ -54,10 +54,14 @@ public partial class SearchResources : IAsyncDisposable /// public string StorageAccountKey => TestFixture.TestEnvironment.SearchStorageKey; + /// + /// The storage endpoint suffix. + /// + public string StorageEndpointSuffix => TestFixture.TestEnvironment.StorageEndpointSuffix ?? "core.windows.net"; /// /// The storage account connection string. /// - public string StorageAccountConnectionString => $"DefaultEndpointsProtocol=https;AccountName={StorageAccountName};AccountKey={StorageAccountKey};EndpointSuffix=core.windows.net"; + public string StorageAccountConnectionString => $"DefaultEndpointsProtocol=https;AccountName={StorageAccountName};AccountKey={StorageAccountKey};EndpointSuffix={StorageEndpointSuffix}"; /// /// The Cognitive Services key. @@ -92,10 +96,15 @@ public string IndexName } private string _indexName = null; + /// + /// The search endpoint suffix. + /// + public string SearchEndpointSuffix => TestFixture.TestEnvironment.SearchEndpointSuffix; + /// /// The URI of the Search service. /// - public Uri Endpoint => new Uri($"https://{SearchServiceName}.search.windows.net"); + public Uri Endpoint => new Uri($"https://{SearchServiceName}.{SearchEndpointSuffix}"); /// /// The Primary or Admin API key to authenticate requests to the diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestEnvironment.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestEnvironment.cs index dee38161611c8..db541c358850a 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestEnvironment.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestEnvironment.cs @@ -65,6 +65,11 @@ public class SearchTestEnvironment: TestEnvironment /// public string SearchCognitiveKey => GetRecordedVariable(CognitiveKeyVariableName); + /// + /// Gets the search service suffix. + /// + public string SearchEndpointSuffix => GetRecordedOptionalVariable("SEARCH_ENDPOINT_SUFFIX") ?? "search.windows.net"; + /// /// Gets the optional Key Vault URL used for double-encrypted indexes. /// diff --git a/sdk/search/tests.yml b/sdk/search/tests.yml index 504d0767abcf0..8f5ce60a00983 100644 --- a/sdk/search/tests.yml +++ b/sdk/search/tests.yml @@ -4,8 +4,9 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: search - TimeoutInMinutes: 120 + TimeoutInMinutes: 240 MaxParallel: 2 UnsupportedClouds: Canary + Clouds: 'Public,Preview,UsGov,China' EnvVars: AZURE_SEARCH_TEST_MODE: Live