fixed a test (#263)
This commit is contained in:
Родитель
1a2f7f08c8
Коммит
18b5995082
|
@ -1,45 +1,45 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
|
||||
"automation", "date": "2018-06-26T23:09:15Z"}}'
|
||||
body: '{"location": "westus2", "tags": {"product": "azurecli", "cause": "automation",
|
||||
"date": "2018-08-17T00:32:13Z"}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [group create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['118']
|
||||
Content-Length: ['111']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) requests/2.19.0 msrest/0.5.0
|
||||
msrest_azure/0.4.31 resourcemanagementclient/2.0.0rc2 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.40]
|
||||
User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
|
||||
msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.45]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
|
||||
response:
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-06-26T23:09:15Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2018-08-17T00:32:13Z"},"properties":{"provisioningState":"Succeeded"}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['392']
|
||||
content-length: ['385']
|
||||
content-type: [application/json; charset=utf-8]
|
||||
date: ['Tue, 26 Jun 2018 23:09:16 GMT']
|
||||
date: ['Fri, 17 Aug 2018 00:32:16 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1198']
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1199']
|
||||
status: {code: 201, message: Created}
|
||||
- request:
|
||||
body: '{"sku": {"name": "Standard_RAGRS"}, "kind": "StorageV2", "location": "southcentralus",
|
||||
body: '{"sku": {"name": "Standard_RAGRS"}, "kind": "StorageV2", "location": "westus2",
|
||||
"properties": {"supportsHttpsTrafficOnly": false, "isHnsEnabled": true}}'
|
||||
headers:
|
||||
Accept: [application/json]
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['159']
|
||||
Content-Length: ['152']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) requests/2.19.0 msrest/0.5.0
|
||||
msrest_azure/0.4.31 azure-mgmt-storage/2.0.0rc3 Azure-SDK-For-Python AZURECLI/2.0.40]
|
||||
User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
|
||||
msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc3 Azure-SDK-For-Python AZURECLI/2.0.45]
|
||||
accept-language: [en-US]
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002?api-version=2018-03-01-preview
|
||||
|
@ -49,15 +49,15 @@ interactions:
|
|||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
content-type: [text/plain; charset=utf-8]
|
||||
date: ['Tue, 26 Jun 2018 23:09:17 GMT']
|
||||
date: ['Fri, 17 Aug 2018 00:32:18 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/southcentralus/asyncoperations/e76d8761-c829-42e7-ad0e-f9f253071beb?monitor=true&api-version=2018-03-01-preview']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/7c104918-cdda-4e21-82fc-a0761dce6e14?monitor=true&api-version=2018-03-01-preview']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
Microsoft-HTTPAPI/2.0']
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1198']
|
||||
x-ms-ratelimit-remaining-subscription-writes: ['1199']
|
||||
status: {code: 202, message: Accepted}
|
||||
- request:
|
||||
body: null
|
||||
|
@ -66,17 +66,17 @@ interactions:
|
|||
Accept-Encoding: ['gzip, deflate']
|
||||
CommandName: [storage account create]
|
||||
Connection: [keep-alive]
|
||||
User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) requests/2.19.0 msrest/0.5.0
|
||||
msrest_azure/0.4.31 azure-mgmt-storage/2.0.0rc3 Azure-SDK-For-Python AZURECLI/2.0.40]
|
||||
User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
|
||||
msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc3 Azure-SDK-For-Python AZURECLI/2.0.45]
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/southcentralus/asyncoperations/e76d8761-c829-42e7-ad0e-f9f253071beb?monitor=true&api-version=2018-03-01-preview
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/7c104918-cdda-4e21-82fc-a0761dce6e14?monitor=true&api-version=2018-03-01-preview
|
||||
response:
|
||||
body: {string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","name":"cli000002","type":"Microsoft.Storage/storageAccounts","location":"southcentralus","tags":{},"properties":{"isHnsEnabled":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-06-26T23:09:17.8290930Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-06-26T23:09:17.8290930Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-06-26T23:09:17.7665936Z","primaryEndpoints":{"web":"https://cli000002.z21.web.core.windows.net/","blob":"https://cli000002.blob.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/","file":"https://cli000002.file.core.windows.net/"},"primaryLocation":"southcentralus","statusOfPrimary":"available","secondaryLocation":"northcentralus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://cli000002-secondary.z21.web.core.windows.net/","blob":"https://cli000002-secondary.blob.core.windows.net/","queue":"https://cli000002-secondary.queue.core.windows.net/","table":"https://cli000002-secondary.table.core.windows.net/"}}}'}
|
||||
body: {string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000002","name":"cli000002","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"isHnsEnabled":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-17T00:32:18.9987151Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-17T00:32:18.9987151Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-17T00:32:18.8737301Z","primaryEndpoints":{"web":"https://cli000002.z5.web.core.windows.net/","blob":"https://cli000002.blob.core.windows.net/","queue":"https://cli000002.queue.core.windows.net/","table":"https://cli000002.table.core.windows.net/","file":"https://cli000002.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available","secondaryLocation":"westcentralus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://cli000002-secondary.z5.web.core.windows.net/","blob":"https://cli000002-secondary.blob.core.windows.net/","queue":"https://cli000002-secondary.queue.core.windows.net/","table":"https://cli000002-secondary.table.core.windows.net/"}}}'}
|
||||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['1755']
|
||||
content-length: ['1738']
|
||||
content-type: [application/json]
|
||||
date: ['Tue, 26 Jun 2018 23:09:34 GMT']
|
||||
date: ['Fri, 17 Aug 2018 00:32:36 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
|
@ -95,8 +95,8 @@ interactions:
|
|||
Connection: [keep-alive]
|
||||
Content-Length: ['81']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) requests/2.19.0 msrest/0.5.0
|
||||
msrest_azure/0.4.31 azure-mgmt-storage/2.0.0rc3 Azure-SDK-For-Python AZURECLI/2.0.40]
|
||||
User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
|
||||
msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc3 Azure-SDK-For-Python AZURECLI/2.0.45]
|
||||
accept-language: [en-US]
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2018-03-01-preview
|
||||
|
@ -107,7 +107,7 @@ interactions:
|
|||
cache-control: [no-cache]
|
||||
content-length: ['129']
|
||||
content-type: [application/json]
|
||||
date: ['Tue, 26 Jun 2018 23:09:36 GMT']
|
||||
date: ['Fri, 17 Aug 2018 00:32:37 GMT']
|
||||
expires: ['-1']
|
||||
pragma: [no-cache]
|
||||
server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
|
||||
|
@ -126,9 +126,9 @@ interactions:
|
|||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
User-Agent: [python/3.6.5 (Windows-10-10.0.17134-SP0) requests/2.19.0 msrest/0.5.0
|
||||
msrest_azure/0.4.31 resourcemanagementclient/2.0.0rc2 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.40]
|
||||
User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
|
||||
msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python
|
||||
AZURECLI/2.0.45]
|
||||
accept-language: [en-US]
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
|
||||
|
@ -137,9 +137,9 @@ interactions:
|
|||
headers:
|
||||
cache-control: [no-cache]
|
||||
content-length: ['0']
|
||||
date: ['Tue, 26 Jun 2018 23:09:38 GMT']
|
||||
date: ['Fri, 17 Aug 2018 00:32:39 GMT']
|
||||
expires: ['-1']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc3WEpaWVMyQk80WDRWQldBTUpKVFhCRFhITVU1N1BZR1oySXw4OURENjhGNEE2QkFBMDZDLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
|
||||
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdSUkhPNFhSVUNIMzREUDNURkxDSEtaSTJIQllQVVVTVUZFTnwzQzE4Q0Y1RjY4NTk5ODc4LVdFU1RVUzIiLCJqb2JMb2NhdGlvbiI6Indlc3R1czIifQ?api-version=2018-05-01']
|
||||
pragma: [no-cache]
|
||||
strict-transport-security: [max-age=31536000; includeSubDomains]
|
||||
x-content-type-options: [nosniff]
|
||||
|
|
|
@ -136,7 +136,7 @@ class StorageAccountTests(StorageScenarioMixin, ScenarioTest):
|
|||
checks=JMESPathCheck('nameAvailable', True))
|
||||
|
||||
@api_version_constraint(CUSTOM_MGMT_STORAGE, min_api='2017-10-01')
|
||||
@ResourceGroupPreparer(parameter_name_for_location='location', location='southcentralus')
|
||||
@ResourceGroupPreparer(parameter_name_for_location='location', location='westus2')
|
||||
def test_create_storage_account_v2(self, resource_group, location):
|
||||
self.kwargs.update({
|
||||
'name': self.create_random_name(prefix='cli', length=24),
|
||||
|
|
Загрузка…
Ссылка в новой задаче