diff --git a/scripts/ci/test_source.sh b/scripts/ci/test_source.sh index 6a45fb3d0f1..02fe04eb21f 100755 --- a/scripts/ci/test_source.sh +++ b/scripts/ci/test_source.sh @@ -3,10 +3,8 @@ set -ex # Install CLI & CLI testsdk echo "Installing azure-cli-testsdk and azure-cli..." - -# Update the git commit or branch when we need a new version of azure-cli-testsdk +pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge pip install "git+https://github.com/Azure/azure-cli@dev#egg=azure-cli-testsdk&subdirectory=src/azure-cli-testsdk" -q -pip install knack==0.3.2 -q echo "Installed." python ./scripts/ci/test_source.py -v diff --git a/src/dns/azext_dns/tests/latest/recordings/test_private_dns.yaml b/src/dns/azext_dns/tests/latest/recordings/test_private_dns.yaml index 01e4c200471..62bb88ea2ba 100644 --- a/src/dns/azext_dns/tests/latest/recordings/test_private_dns.yaml +++ b/src/dns/azext_dns/tests/latest/recordings/test_private_dns.yaml @@ -69,7 +69,7 @@ interactions: AZURECLI/2.0.29] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/regvnet?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/regvnet?api-version=2018-02-01 response: body: {string: "{\r\n \"name\": \"regvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/regvnet\"\ ,\r\n \"etag\": \"W/\\\"765f5089-5dcd-4b01-ad45-ea13e050a6d6\\\"\",\r\n \ @@ -82,7 +82,7 @@ interactions: \ [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ : false\r\n }\r\n}"} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/03c50379-a01f-4e89-b8d2-9891d46d9ca9?api-version=2018-01-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/03c50379-a01f-4e89-b8d2-9891d46d9ca9?api-version=2018-02-01'] cache-control: [no-cache] content-length: ['770'] content-type: [application/json; charset=utf-8] @@ -105,7 +105,7 @@ interactions: msrest_azure/0.4.22 networkmanagementclient/2.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.29] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/03c50379-a01f-4e89-b8d2-9891d46d9ca9?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/03c50379-a01f-4e89-b8d2-9891d46d9ca9?api-version=2018-02-01 response: body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} headers: @@ -132,7 +132,7 @@ interactions: msrest_azure/0.4.22 networkmanagementclient/2.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.29] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/03c50379-a01f-4e89-b8d2-9891d46d9ca9?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/03c50379-a01f-4e89-b8d2-9891d46d9ca9?api-version=2018-02-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: @@ -159,7 +159,7 @@ interactions: msrest_azure/0.4.22 networkmanagementclient/2.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.29] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/regvnet?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/regvnet?api-version=2018-02-01 response: body: {string: "{\r\n \"name\": \"regvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/regvnet\"\ ,\r\n \"etag\": \"W/\\\"fb887bd7-0b60-4bae-a17b-a1975c3c9a7a\\\"\",\r\n \ @@ -227,7 +227,7 @@ interactions: AZURECLI/2.0.29] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/resvnet?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/resvnet?api-version=2018-02-01 response: body: {string: "{\r\n \"name\": \"resvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/resvnet\"\ ,\r\n \"etag\": \"W/\\\"7e4ce79b-9854-43dd-a927-ae13b44f87c5\\\"\",\r\n \ @@ -240,7 +240,7 @@ interactions: \ [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ : false\r\n }\r\n}"} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2aed309b-1a46-4557-8866-9ba05dee64e5?api-version=2018-01-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2aed309b-1a46-4557-8866-9ba05dee64e5?api-version=2018-02-01'] cache-control: [no-cache] content-length: ['770'] content-type: [application/json; charset=utf-8] @@ -263,7 +263,7 @@ interactions: msrest_azure/0.4.22 networkmanagementclient/2.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.29] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2aed309b-1a46-4557-8866-9ba05dee64e5?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2aed309b-1a46-4557-8866-9ba05dee64e5?api-version=2018-02-01 response: body: {string: "{\r\n \"status\": \"InProgress\"\r\n}"} headers: @@ -290,7 +290,7 @@ interactions: msrest_azure/0.4.22 networkmanagementclient/2.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.29] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2aed309b-1a46-4557-8866-9ba05dee64e5?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2aed309b-1a46-4557-8866-9ba05dee64e5?api-version=2018-02-01 response: body: {string: "{\r\n \"status\": \"Succeeded\"\r\n}"} headers: @@ -317,7 +317,7 @@ interactions: msrest_azure/0.4.22 networkmanagementclient/2.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.29] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/resvnet?api-version=2018-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/resvnet?api-version=2018-02-01 response: body: {string: "{\r\n \"name\": \"resvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dns000001/providers/Microsoft.Network/virtualNetworks/resvnet\"\ ,\r\n \"etag\": \"W/\\\"dce2c474-cf6b-4364-915f-5979ff06e585\\\"\",\r\n \ diff --git a/src/subscription/azext_subscription/tests/latest/test_subscription_commands.py b/src/subscription/azext_subscription/tests/latest/test_subscription_commands.py index 8417f1bc94b..a88c770135e 100644 --- a/src/subscription/azext_subscription/tests/latest/test_subscription_commands.py +++ b/src/subscription/azext_subscription/tests/latest/test_subscription_commands.py @@ -12,6 +12,6 @@ class AzureSubscriptionScenarioTest(ScenarioTest): def test_create_subscription(self): enrollment_accounts = self.cmd('billing enrollment-account list').get_output_in_json() - result = self.cmd('account create --enrollment-account-name {} --offer-type MS-AZR-0148P'.format(enrollment_accounts[0].name)).get_output_in_json() + result = self.cmd('account create --enrollment-account-name {} --offer-type MS-AZR-0148P'.format(enrollment_accounts[0]['name'])).get_output_in_json() self.assertIsNotNone(result) - self.assertIsNotNone(result.subscription_link) + self.assertIsNotNone(result['subscriptionLink'])