diff --git a/sdk/servermanager/azure-mgmt-servermanager/dev_requirements.txt b/sdk/servermanager/azure-mgmt-servermanager/dev_requirements.txt index 13ea84a091ed..928e70fa085e 100644 --- a/sdk/servermanager/azure-mgmt-servermanager/dev_requirements.txt +++ b/sdk/servermanager/azure-mgmt-servermanager/dev_requirements.txt @@ -1,3 +1,4 @@ -e ../../../tools/azure-sdk-tools -e ../../../tools/azure-devtools azure-core +../../identity/azure-identity diff --git a/sdk/servermanager/azure-mgmt-servermanager/tests/conftest.py b/sdk/servermanager/azure-mgmt-servermanager/tests/conftest.py new file mode 100644 index 000000000000..c409e44945ca --- /dev/null +++ b/sdk/servermanager/azure-mgmt-servermanager/tests/conftest.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import os +import platform +import pytest +import sys + +from dotenv import load_dotenv + +from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_body_key_sanitizer, add_header_regex_sanitizer + +# Ignore async tests for Python < 3.5 +collect_ignore_glob = [] +if sys.version_info < (3, 5) or platform.python_implementation() == "PyPy": + collect_ignore_glob.append("*_async.py") + +load_dotenv() + +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/servermanager/azure-mgmt-servermanager/tests/test_mgmt_servermanager.py b/sdk/servermanager/azure-mgmt-servermanager/tests/disable_test_mgmt_servermanager.py similarity index 77% rename from sdk/servermanager/azure-mgmt-servermanager/tests/test_mgmt_servermanager.py rename to sdk/servermanager/azure-mgmt-servermanager/tests/disable_test_mgmt_servermanager.py index 164d761714a3..1b4706bef4df 100644 --- a/sdk/servermanager/azure-mgmt-servermanager/tests/test_mgmt_servermanager.py +++ b/sdk/servermanager/azure-mgmt-servermanager/tests/disable_test_mgmt_servermanager.py @@ -8,17 +8,17 @@ import unittest import azure.mgmt.servermanager -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy -class MgmtServerManagerTest(AzureMgmtTestCase): +class TestMgmtServerManager(AzureMgmtRecordedTestCase): - def setUp(self): - super(MgmtServerManagerTest, self).setUp() + def setup_method(self, method): self.client = self.create_mgmt_client( azure.mgmt.servermanager.ServerManagement ) @ResourceGroupPreparer() + @recorded_by_proxy def test_servermanager_gateways(self, resource_group, location): gateway_name = self.get_resource_name('pygateway') region = 'centralus' @@ -29,16 +29,16 @@ def test_servermanager_gateways(self, resource_group, location): region ) gateway = gateway_async.result() - self.assertEqual(gateway.name, gateway_name) + assert gateway.name == gateway_name gateway = self.client.gateway.get( resource_group.name, gateway_name ) - self.assertEqual(gateway.name, gateway_name) + assert gateway.name == gateway_name gateways = list(self.client.gateway.list()) - self.assertEqual(len(gateways), 1) + assert len(gateways) == 1 #------------------------------------------------------------------------------ if __name__ == '__main__': diff --git a/sdk/servermanager/azure-mgmt-servermanager/tests/recordings/test_mgmt_servermanager.test_servermanager_gateways.yaml b/sdk/servermanager/azure-mgmt-servermanager/tests/recordings/test_mgmt_servermanager.test_servermanager_gateways.yaml deleted file mode 100644 index 0bae57ede8c9..000000000000 --- a/sdk/servermanager/azure-mgmt-servermanager/tests/recordings/test_mgmt_servermanager.test_servermanager_gateways.yaml +++ /dev/null @@ -1,215 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: [application/json] - Accept-Charset: [utf-8] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.11.1] - client-request-id: [64b93861-08a7-40ec-9f8d-59e71a9e72f6] - return-client-request-id: ['true'] - x-client-CPU: [x86] - x-client-OS: [win32] - x-client-SKU: [Python] - x-client-Ver: [0.4.3] - method: GET - uri: https:/login.microsoftonline.com/common/UserRealm/unittest%40myaddomain.onmicrosoft.com?api-version=1.0 - response: - body: {string: '{"ver":"1.0","account_type":"Managed","domain_name":"myaddomain.onmicrosoft.com","cloud_instance_name":"microsoftonline.com"}'} - headers: - Cache-Control: [private] - Content-Length: ['131'] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:46:57 GMT'] - P3P: [CP="DSP CUR OTPi IND OTRi ONL FIN"] - Server: [Microsoft-IIS/8.5] - Set-Cookie: [esctx=AQABAAAAAADRNYRQ3dhRSrm-4K-adpCJv071PxUXsChH64FqvxFHLvpmcUtdq3oFVedvoRSlfm_qiY6SXQkTyS-FR2d37kH8HReKt1bOsgwBpFaBNDR4j8S5-uc_VSEt-ChmUwfAnMGBLwduo356OtX3lKA3DOp5N-ph0c54nD-Y62ozl29KmC3mJtNzaIcicCkM--Wkd64gAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly, x-ms-gateway-slice=corp; - path=/; secure; HttpOnly, stsservicecookie=ests; path=/; secure; HttpOnly] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - client-request-id: [64b93861-08a7-40ec-9f8d-59e71a9e72f6] - x-ms-request-id: [bf6e1785-2cc6-48e5-932d-c408367919cb] - status: {code: 200, message: OK} -- request: - body: username=unittest%40myaddomain.onmicrosoft.com&password=R0ckNTe5T%21&scope=openid&client_id=04b07795-8ddb-461a-bbee-02f9e1bf7b46&resource=https%3A%2F%2Fmanagement.core.windows.net%2F&grant_type=password - headers: - Accept: ['*/*'] - Accept-Charset: [utf-8] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['208'] - User-Agent: [python-requests/2.11.1] - client-request-id: [64b93861-08a7-40ec-9f8d-59e71a9e72f6] - content-type: [application/x-www-form-urlencoded] - return-client-request-id: ['true'] - x-client-CPU: [x86] - x-client-OS: [win32] - x-client-SKU: [Python] - x-client-Ver: [0.4.3] - method: POST - uri: https:/login.microsoftonline.com/common/oauth2/token?api-version=1.0 - response: - body: {string: '{"token_type":"Bearer","scope":"user_impersonation","expires_in":"3599","ext_expires_in":"10800","expires_on":"1481244418","not_before":"1481240518","resource":"https://management.core.windows.net/","access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dC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E4sOjePNZa5oUSpDhxtfWFK729XquIAA","id_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJhdWQiOiIwNGIwNzc5NS04ZGRiLTQ2MWEtYmJlZS0wMmY5ZTFiZjdiNDYiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9kNjUwOWUwYy1jYTY0LTRlNWQtYWUyNC05MGE1YjdkMjc5ZTgvIiwiaWF0IjoxNDgxMjQwNTE4LCJuYmYiOjE0ODEyNDA1MTgsImV4cCI6MTQ4MTI0NDQxOCwiYW1yIjpbInB3ZCJdLCJmYW1pbHlfbmFtZSI6IlRlc3RzIiwiZ2l2ZW5fbmFtZSI6IlVuaXQiLCJpcGFkZHIiOiIxNjcuMjIwLjEuMTcyIiwibmFtZSI6IlVuaXQgVGVzdHMiLCJvaWQiOiJlZDk1ZDZjYy02YWQzLTQyYmItODM0ZS04MjZkMWM3ZGI1NDMiLCJwbGF0ZiI6IjE0Iiwic3ViIjoiZFNlSGJCQlhXOHNESEtJRjdVYWRqZjZsWDdFazZaSy1wdGJaQ3VNUHhkayIsInRpZCI6ImQ2NTA5ZTBjLWNhNjQtNGU1ZC1hZTI0LTkwYTViN2QyNzllOCIsInVuaXF1ZV9uYW1lIjoidW5pdHRlc3RAcHR2c2F6dXJlb3V0bG9vay5vbm1pY3Jvc29mdC5jb20iLCJ1cG4iOiJ1bml0dGVzdEBwdHZzYXp1cmVvdXRsb29rLm9ubWljcm9zb2Z0LmNvbSIsInZlciI6IjEuMCJ9."}'} - headers: - Cache-Control: ['no-cache, no-store'] - Content-Length: ['3202'] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:46:57 GMT'] - Expires: ['-1'] - P3P: [CP="DSP CUR OTPi IND OTRi ONL FIN"] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Set-Cookie: [esctx=AQABAAAAAADRNYRQ3dhRSrm-4K-adpCJUEVempVGp8y0uABGzCx9IFtp75xBRVQquMSeqy8-H1ZejyMTr8tb4P8w3oSVMSXA6c-1NK_7lm_QRJ62ysGzvPWz7VghplO56svCKKoSUqFfMUPuPk6MsVA-BryWEN9ObjcGDjpuG6xmqHlEXp1pRbmhNfw200Ix1gAG687ezesgAA; - domain=.login.microsoftonline.com; path=/; secure; HttpOnly, x-ms-gateway-slice=corp; - path=/; secure; HttpOnly, stsservicecookie=ests; path=/; secure; HttpOnly] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - client-request-id: [64b93861-08a7-40ec-9f8d-59e71a9e72f6] - x-ms-request-id: [6c94dc28-6e25-42b9-95d2-5dc6f3cd7950] - status: {code: 200, message: OK} -- request: - body: '{"location": "centralus"}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['25'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.11.1 msrest/0.4.4 - msrest_azure/0.4.5 servermanagement/1.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b51508c-bda0-11e6-a665-ecb1d756380e] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_servermanager_test_servermanager_gateways26e51529/providers/Microsoft.ServerManagement/gateways/pygateway26e51529?api-version=2016-07-01-preview - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_servermanager_test_servermanager_gateways26e51529/providers/microsoft.servermanagement/gateways/pygateway26e51529","name":"pygateway26e51529","type":"microsoft.servermanagement/gateways","location":"centralus","etag":"W/\"datetime''2016-12-08T23%3A47%3A02.4555328Z''\"","properties":{"created":"2016-12-08T23:46:58.9652921Z","updated":"2016-12-08T23:46:58.9652921Z","autoUpgrade":"On","upgradeMode":"Automatic","desiredVersion":null,"minimumVersion":"1.0.1645.0"}}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:01 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['546'] - x-managementservice-fileversion: [1.0.1884.0] - x-ms-correlation-request-id: [3843bbf8-cc5d-46ee-98ad-a39d9f16dae9] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [3843bbf8-cc5d-46ee-98ad-a39d9f16dae9] - x-ms-routing-request-id: ['CENTRALUS:20161208T234702Z:3843bbf8-cc5d-46ee-98ad-a39d9f16dae9'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.11.1 msrest/0.4.4 - msrest_azure/0.4.5 servermanagement/1.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9b51508c-bda0-11e6-a665-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_servermanager_test_servermanager_gateways26e51529/providers/Microsoft.ServerManagement/gateways/pygateway26e51529?api-version=2016-07-01-preview - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_servermanager_test_servermanager_gateways26e51529/providers/microsoft.servermanagement/gateways/pygateway26e51529","name":"pygateway26e51529","type":"microsoft.servermanagement/gateways","location":"centralus","etag":"W/\"datetime''2016-12-08T23%3A47%3A02.4555328Z''\"","properties":{"created":"2016-12-08T23:46:58.9652921Z","updated":"2016-12-08T23:46:58.9652921Z","autoUpgrade":"On","upgradeMode":"Automatic","desiredVersion":null,"minimumVersion":"1.0.1645.0"}}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:02 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['546'] - x-managementservice-fileversion: [1.0.1884.0] - x-ms-correlation-request-id: [3d30b3c3-c54a-4ef7-b20d-2eeafbf913ee] - x-ms-ratelimit-remaining-subscription-reads: ['14993'] - x-ms-request-id: [3d30b3c3-c54a-4ef7-b20d-2eeafbf913ee] - x-ms-routing-request-id: ['CENTRALUS:20161208T234702Z:3d30b3c3-c54a-4ef7-b20d-2eeafbf913ee'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.11.1 msrest/0.4.4 - msrest_azure/0.4.5 servermanagement/1.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9e6a5aca-bda0-11e6-93e6-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_servermanager_test_servermanager_gateways26e51529/providers/Microsoft.ServerManagement/gateways/pygateway26e51529?api-version=2016-07-01-preview - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_servermanager_test_servermanager_gateways26e51529/providers/microsoft.servermanagement/gateways/pygateway26e51529","name":"pygateway26e51529","type":"microsoft.servermanagement/gateways","location":"centralus","etag":"W/\"datetime''2016-12-08T23%3A47%3A02.4555328Z''\"","properties":{"created":"2016-12-08T23:46:58.9652921Z","updated":"2016-12-08T23:46:58.9652921Z","autoUpgrade":"On","upgradeMode":"Automatic","desiredVersion":null,"minimumVersion":"1.0.1645.0"}}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:02 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['546'] - x-managementservice-fileversion: [1.0.1884.0] - x-ms-correlation-request-id: [fc31613a-9039-4b8f-ad44-5d82018a9787] - x-ms-ratelimit-remaining-subscription-reads: ['14996'] - x-ms-request-id: [fc31613a-9039-4b8f-ad44-5d82018a9787] - x-ms-routing-request-id: ['CENTRALUS:20161208T234703Z:fc31613a-9039-4b8f-ad44-5d82018a9787'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.11.1 msrest/0.4.4 - msrest_azure/0.4.5 servermanagement/1.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [9eba16b8-bda0-11e6-8801-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServerManagement/gateways?api-version=2016-07-01-preview - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_servermanager_test_servermanager_gateways26e51529/providers/microsoft.servermanagement/gateways/pygateway26e51529","name":"pygateway26e51529","type":"microsoft.servermanagement/gateways","location":"centralus","etag":"W/\"datetime''2016-12-08T23%3A47%3A02.4555328Z''\"","properties":{"created":"2016-12-08T23:46:58.9652921Z","updated":"2016-12-08T23:46:58.9652921Z","autoUpgrade":"On","upgradeMode":"Automatic","desiredVersion":null,"minimumVersion":"1.0.1645.0"}}]}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Thu, 08 Dec 2016 23:47:04 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.5] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - X-AspNet-Version: [4.0.30319] - X-Content-Type-Options: [nosniff] - X-Powered-By: [ASP.NET] - content-length: ['558'] - x-managementservice-fileversion: [1.0.1884.0] - x-ms-correlation-request-id: [65ad5452-64b8-4e1c-bf0b-3d3f2a4354b8] - x-ms-ratelimit-remaining-subscription-reads: ['14995'] - x-ms-request-id: [65ad5452-64b8-4e1c-bf0b-3d3f2a4354b8] - x-ms-routing-request-id: ['CENTRALUS:20161208T234705Z:65ad5452-64b8-4e1c-bf0b-3d3f2a4354b8'] - status: {code: 200, message: OK} -version: 1 diff --git a/sdk/servermanager/ci.yml b/sdk/servermanager/ci.yml index 741e2972016b..57267f06f9ec 100644 --- a/sdk/servermanager/ci.yml +++ b/sdk/servermanager/ci.yml @@ -27,6 +27,7 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: servermanager + TestProxy: true Artifacts: - name: azure-mgmt-servermanager safeName: azuremgmtservermanager