From 278e7bdc39cb06ae71b6f6534b304d1e0f6b2125 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:12:05 +0000 Subject: [PATCH] Fix azure tests to follow new backend validation (#2603) Co-authored-by: ci.datadog-api-spec Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> --- .apigentools-info | 8 ++++---- .generator/schemas/v1/openapi.yaml | 2 +- .../v1/azure-integration/CreateAzureIntegration.go | 2 +- .../v1/azure-integration/UpdateAzureHostFilters.go | 2 +- .../v1/azure-integration/UpdateAzureIntegration.go | 2 +- ...an_Azure_integration_returns_OK_response.freeze | 2 +- ...e_an_Azure_integration_returns_OK_response.yaml | 4 ++-- ...an_Azure_integration_returns_OK_response.freeze | 2 +- ...e_an_Azure_integration_returns_OK_response.yaml | 6 +++--- ...an_Azure_integration_returns_OK_response.freeze | 2 +- ...e_an_Azure_integration_returns_OK_response.yaml | 6 +++--- .../features/v1/azure_integration.feature | 14 +++++++------- tests/scenarios/features/v1/given.json | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 8ff57b0d92a..9682a7f5cfa 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-23 18:14:11.476548", - "spec_repo_commit": "9e027051" + "regenerated": "2024-07-25 18:59:27.218959", + "spec_repo_commit": "ccf15bee" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-23 18:14:11.494752", - "spec_repo_commit": "9e027051" + "regenerated": "2024-07-25 18:59:27.236772", + "spec_repo_commit": "ccf15bee" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index ece6de82519..5580a1c014f 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -804,7 +804,7 @@ components: type: string client_secret: description: Your Azure web application secret key. - example: testingx./Sw*g/Y33t..R1cH+hScMDt + example: TestingRh2nx664kUy5dIApvM54T4AtO type: string container_app_filters: description: 'Limit the Azure container apps that are pulled into Datadog diff --git a/examples/v1/azure-integration/CreateAzureIntegration.go b/examples/v1/azure-integration/CreateAzureIntegration.go index fde893d0096..c7b38ef39d1 100644 --- a/examples/v1/azure-integration/CreateAzureIntegration.go +++ b/examples/v1/azure-integration/CreateAzureIntegration.go @@ -17,7 +17,7 @@ func main() { AppServicePlanFilters: datadog.PtrString("key:value,filter:example"), Automute: datadog.PtrBool(true), ClientId: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), - ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"), + ClientSecret: datadog.PtrString("TestingRh2nx664kUy5dIApvM54T4AtO"), ContainerAppFilters: datadog.PtrString("key:value,filter:example"), CspmEnabled: datadog.PtrBool(true), CustomMetricsEnabled: datadog.PtrBool(true), diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.go b/examples/v1/azure-integration/UpdateAzureHostFilters.go index 2df9ba76b39..a21c8ad3494 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.go +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.go @@ -17,7 +17,7 @@ func main() { AppServicePlanFilters: datadog.PtrString("key:value,filter:example"), Automute: datadog.PtrBool(true), ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"), - ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"), + ClientSecret: datadog.PtrString("TestingRh2nx664kUy5dIApvM54T4AtO"), ContainerAppFilters: datadog.PtrString("key:value,filter:example"), CspmEnabled: datadog.PtrBool(true), CustomMetricsEnabled: datadog.PtrBool(true), diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.go b/examples/v1/azure-integration/UpdateAzureIntegration.go index 83e446a90d2..a97ba5b92fb 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.go +++ b/examples/v1/azure-integration/UpdateAzureIntegration.go @@ -17,7 +17,7 @@ func main() { AppServicePlanFilters: datadog.PtrString("key:value,filter:example"), Automute: datadog.PtrBool(true), ClientId: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), - ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"), + ClientSecret: datadog.PtrString("TestingRh2nx664kUy5dIApvM54T4AtO"), ContainerAppFilters: datadog.PtrString("key:value,filter:example"), CspmEnabled: datadog.PtrBool(true), CustomMetricsEnabled: datadog.PtrBool(true), diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.freeze index d8f2b084145..a7a07bffc74 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.freeze @@ -1 +1 @@ -2024-02-28T20:25:59.580Z \ No newline at end of file +2024-07-25T18:47:35.049Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.yaml index a1bfed2ed28..82e229f2da1 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Create_an_Azure_integration_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17091519-0000-0000-0000-170915195900","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":"17091519-0000-0000-0000-170915195900","new_tenant_name":"17091519-0000-0000-0000-170915195900","resource_collection_enabled":true,"tenant_name":"17091519-0000-0000-0000-170915195900"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17219332-0000-0000-0000-172193325500","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17219332-0000-0000-0000-172193325500","new_tenant_name":"17219332-0000-0000-0000-172193325500","resource_collection_enabled":true,"tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: @@ -23,7 +23,7 @@ interactions: status: 200 OK - request: body: | - {"client_id":"17091519-0000-0000-0000-170915195900","tenant_name":"17091519-0000-0000-0000-170915195900"} + {"client_id":"17219332-0000-0000-0000-172193325500","tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.freeze index 3124154711f..870f5621991 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.freeze @@ -1 +1 @@ -2024-07-01T18:40:05.567Z \ No newline at end of file +2024-07-25T18:47:35.517Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.yaml index 35f4077d17a..092c365a1c6 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Delete_an_Azure_integration_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17198592-0000-0000-0000-171985920500","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","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17198592-0000-0000-0000-171985920500","new_tenant_name":"17198592-0000-0000-0000-171985920500","resource_collection_enabled":true,"tenant_name":"17198592-0000-0000-0000-171985920500"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17219332-0000-0000-0000-172193325500","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17219332-0000-0000-0000-172193325500","new_tenant_name":"17219332-0000-0000-0000-172193325500","resource_collection_enabled":true,"tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: @@ -23,7 +23,7 @@ interactions: status: 200 OK - request: body: | - {"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"} + {"client_id":"17219332-0000-0000-0000-172193325500","tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: @@ -45,7 +45,7 @@ interactions: status: 200 OK - request: body: | - {"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"} + {"client_id":"17219332-0000-0000-0000-172193325500","tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.freeze index 938f5155db4..fd432cbc306 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.freeze @@ -1 +1 @@ -2024-07-01T18:40:05.942Z \ No newline at end of file +2024-07-25T18:47:35.975Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.yaml index 8a2943bf278..a1fa5c25d85 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Azure_Integration/Scenario_Update_an_Azure_integration_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17198592-0000-0000-0000-171985920500","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","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17198592-0000-0000-0000-171985920500","new_tenant_name":"17198592-0000-0000-0000-171985920500","resource_collection_enabled":true,"tenant_name":"17198592-0000-0000-0000-171985920500"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17219332-0000-0000-0000-172193325500","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17219332-0000-0000-0000-172193325500","new_tenant_name":"17219332-0000-0000-0000-172193325500","resource_collection_enabled":true,"tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: @@ -23,7 +23,7 @@ interactions: status: 200 OK - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17198592-0000-0000-0000-171985920500","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","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17198592-0000-0000-0000-171985920500","new_tenant_name":"17198592-0000-0000-0000-171985920500","resource_collection_enabled":true,"tenant_name":"17198592-0000-0000-0000-171985920500"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17219332-0000-0000-0000-172193325500","client_secret":"TestingRh2nx664kUy5dIApvM54T4AtO","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17219332-0000-0000-0000-172193325500","new_tenant_name":"17219332-0000-0000-0000-172193325500","resource_collection_enabled":true,"tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: @@ -45,7 +45,7 @@ interactions: status: 200 OK - request: body: | - {"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"} + {"client_id":"17219332-0000-0000-0000-172193325500","tenant_name":"17219332-0000-0000-0000-172193325500"} form: {} headers: Accept: diff --git a/tests/scenarios/features/v1/azure_integration.feature b/tests/scenarios/features/v1/azure_integration.feature index 818ae6e3016..6a9449c67b5 100644 --- a/tests/scenarios/features/v1/azure_integration.feature +++ b/tests/scenarios/features/v1/azure_integration.feature @@ -12,21 +12,21 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "Bad Request" 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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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"} When the request is sent Then the response status is 400 Bad Request @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": "{{ 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 }}"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "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 @generated @skip @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "Bad Request" response Given new "DeleteAzureIntegration" 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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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"} When the request is sent Then the response status is 400 Bad Request @@ -53,21 +53,21 @@ Feature: Azure Integration @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "Bad Request" response Given new "UpdateAzureHostFilters" 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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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"} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "OK" response Given new "UpdateAzureHostFilters" 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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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"} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "Bad Request" response Given new "UpdateAzureIntegration" 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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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"} When the request is sent Then the response status is 400 Bad Request @@ -75,6 +75,6 @@ Feature: Azure Integration Scenario: Update an Azure integration returns "OK" response Given there is a valid "azure_account" in the system And new "UpdateAzureIntegration" request - 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, "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "tenant_name": "{{ uuid }}"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO", "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, "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/given.json b/tests/scenarios/features/v1/given.json index cf63cca14d9..3338b856b0f 100644 --- a/tests/scenarios/features/v1/given.json +++ b/tests/scenarios/features/v1/given.json @@ -117,7 +117,7 @@ { "name": "body", "origin": "request", - "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\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\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"metrics_config\": {\n \"excluded_resource_providers\": [\"Microsoft.Sql\", \"Microsoft.Cdn\"]\n },\n \"tenant_name\": \"{{ uuid }}\"\n}" + "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"TestingRh2nx664kUy5dIApvM54T4AtO\",\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\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"metrics_config\": {\n \"excluded_resource_providers\": [\"Microsoft.Sql\", \"Microsoft.Cdn\"]\n },\n \"tenant_name\": \"{{ uuid }}\"\n}" } ], "step": "there is a valid \"azure_account\" in the system",