From 4011da1a25fd56ebaab8a5120df60cc28fe42e37 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 14 Dec 2023 18:10:55 +0000 Subject: [PATCH] Regenerate client from commit 0df581d5 of spec repo --- .apigentools-info | 8 ++-- tests/conftest.py | 3 +- ...ure_integration_returns_ok_response.frozen | 1 + ...azure_integration_returns_ok_response.yaml | 42 +++++++++++++++++++ tests/v1/features/azure_integration.feature | 4 +- tests/v1/features/undo.json | 8 +++- 6 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.frozen create mode 100644 tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.yaml diff --git a/.apigentools-info b/.apigentools-info index a302b9a747..f9f22da3ea 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-14 17:13:00.567226", - "spec_repo_commit": "fd0b0fcb" + "regenerated": "2023-12-14 18:10:23.844016", + "spec_repo_commit": "0df581d5" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-14 17:13:00.585680", - "spec_repo_commit": "fd0b0fcb" + "regenerated": "2023-12-14 18:10:23.857960", + "spec_repo_commit": "0df581d5" } } } \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index 6a818569d5..56538f330b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -193,7 +193,8 @@ def func(arg): def generate_uuid(freezed_time): freezed_time_string = str(freezed_time.timestamp()) - return freezed_time_string[:8]+"-0000-0000-0000-"+freezed_time_string[:10]+"00" + return freezed_time_string[:8] + "-0000-0000-0000-" + freezed_time_string[:10] + "00" + @pytest.fixture def context(vcr, unique, freezed_time): diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.frozen new file mode 100644 index 0000000000..53e28018d7 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.frozen @@ -0,0 +1 @@ +2023-12-08T15:34:43.210Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.yaml new file mode 100644 index 0000000000..123a9d28b3 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_an_azure_integration_returns_ok_response.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17020496-0000-0000-0000-170204968300","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17020496-0000-0000-0000-170204968300","new_tenant_name":"17020496-0000-0000-0000-170204968300","resource_collection_enabled":true,"tenant_name":"17020496-0000-0000-0000-170204968300"}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/integration/azure + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17020496-0000-0000-0000-170204968300","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17020496-0000-0000-0000-170204968300","new_tenant_name":"17020496-0000-0000-0000-170204968300","resource_collection_enabled":true,"tenant_name":"17020496-0000-0000-0000-170204968300"}' + headers: + accept: + - application/json + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/integration/azure + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/features/azure_integration.feature b/tests/v1/features/azure_integration.feature index de79d3fb3f..289147feae 100644 --- a/tests/v1/features/azure_integration.feature +++ b/tests/v1/features/azure_integration.feature @@ -16,10 +16,10 @@ Feature: Azure Integration When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/azure-integrations + @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "OK" response Given new "CreateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/tests/v1/features/undo.json b/tests/v1/features/undo.json index 4858b63e3c..35f8b8ae40 100644 --- a/tests/v1/features/undo.json +++ b/tests/v1/features/undo.json @@ -485,7 +485,13 @@ "tag": "Azure Integration", "undo": { "operationId": "DeleteAzureIntegration", - "parameters": [], + "parameters": [ + { + "name": "body", + "origin": "request", + "template": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{client_id}}\",\n \"client_secret\": \"testingx./Sw*g/Y33t..R1cH+hScMDt\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"new_client_id\": \"{{new_client_id}}\",\n \"new_tenant_name\": \"{{new_tenant_name}}\",\n \"resource_collection_enabled\": true,\n \"tenant_name\": \"{{tenant_name}}\"\n}" + } + ], "type": "unsafe" } },