From 08b8c073bcf5e7f790b9a8f1d179074f710b0f26 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:12:40 +0000 Subject: [PATCH] Remove unnecessary fields in Azure tests (#2323) 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 ++++---- .../azure-integration/DeleteAzureIntegration.go | 17 ++--------------- ...Azure_integration_returns_OK_response.freeze | 2 +- ...n_Azure_integration_returns_OK_response.yaml | 4 ++-- ...Azure_integration_returns_OK_response.freeze | 2 +- ...n_Azure_integration_returns_OK_response.yaml | 6 +++--- ...Azure_integration_returns_OK_response.freeze | 2 +- ...n_Azure_integration_returns_OK_response.yaml | 6 +++--- .../features/v1/azure_integration.feature | 2 +- tests/scenarios/features/v1/undo.json | 2 +- 10 files changed, 19 insertions(+), 32 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index b69ff6fc03a..39b922c3df9 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-15 18:18:53.721406", - "spec_repo_commit": "118421b2" + "regenerated": "2023-12-18 13:47:04.512930", + "spec_repo_commit": "f363f7b4" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-15 18:18:53.737824", - "spec_repo_commit": "118421b2" + "regenerated": "2023-12-18 13:47:04.528272", + "spec_repo_commit": "f363f7b4" } } } \ No newline at end of file diff --git a/examples/v1/azure-integration/DeleteAzureIntegration.go b/examples/v1/azure-integration/DeleteAzureIntegration.go index 254bbdd2d3d..47154c6a616 100644 --- a/examples/v1/azure-integration/DeleteAzureIntegration.go +++ b/examples/v1/azure-integration/DeleteAzureIntegration.go @@ -14,21 +14,8 @@ import ( func main() { body := datadogV1.AzureAccount{ - 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"), - ContainerAppFilters: datadog.PtrString("key:value,filter:example"), - CspmEnabled: datadog.PtrBool(true), - CustomMetricsEnabled: datadog.PtrBool(true), - Errors: []string{ - "*", - }, - HostFilters: datadog.PtrString("key:value,filter:example"), - NewClientId: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), - NewTenantName: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), - ResourceCollectionEnabled: datadog.PtrBool(true), - TenantName: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + ClientId: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), + TenantName: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), } ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() 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 53e28018d78..10af779fb5e 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 @@ -2023-12-08T15:34:43.210Z \ No newline at end of file +2023-12-15T18:21:55.828Z \ 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 fde15dd92b6..9b9ce16fbad 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":"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"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026645-0000-0000-0000-170266451500","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":"17026645-0000-0000-0000-170266451500","new_tenant_name":"17026645-0000-0000-0000-170266451500","resource_collection_enabled":true,"tenant_name":"17026645-0000-0000-0000-170266451500"} form: {} headers: Accept: @@ -22,7 +22,7 @@ interactions: status: 200 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"} + {"client_id":"17026645-0000-0000-0000-170266451500","tenant_name":"17026645-0000-0000-0000-170266451500"} 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 23156fb06d9..59b6f680c46 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 @@ -2023-12-15T17:19:40.609Z \ No newline at end of file +2023-12-15T18:21:57.741Z \ 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 783e60cb718..bf5e7e647c7 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":"17026607-0000-0000-0000-170266078000","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":"17026607-0000-0000-0000-170266078000","new_tenant_name":"17026607-0000-0000-0000-170266078000","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078000"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026645-0000-0000-0000-170266451700","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":"17026645-0000-0000-0000-170266451700","new_tenant_name":"17026645-0000-0000-0000-170266451700","resource_collection_enabled":true,"tenant_name":"17026645-0000-0000-0000-170266451700"} form: {} headers: Accept: @@ -22,7 +22,7 @@ interactions: status: 200 OK - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078000","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":"17026607-0000-0000-0000-170266078000","new_tenant_name":"17026607-0000-0000-0000-170266078000","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078000"} + {"client_id":"17026645-0000-0000-0000-170266451700","tenant_name":"17026645-0000-0000-0000-170266451700"} form: {} headers: Accept: @@ -43,7 +43,7 @@ interactions: status: 200 OK - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078000","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":"17026607-0000-0000-0000-170266078000","new_tenant_name":"17026607-0000-0000-0000-170266078000","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078000"} + {"client_id":"17026645-0000-0000-0000-170266451700","tenant_name":"17026645-0000-0000-0000-170266451700"} 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 0b2d8e850e4..28414158e09 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 @@ -2023-12-15T17:19:43.390Z \ No newline at end of file +2023-12-15T18:21:59.912Z \ 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 58326b22b52..0b70e905394 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":"17026607-0000-0000-0000-170266078300","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":"17026607-0000-0000-0000-170266078300","new_tenant_name":"17026607-0000-0000-0000-170266078300","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078300"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026645-0000-0000-0000-170266451900","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":"17026645-0000-0000-0000-170266451900","new_tenant_name":"17026645-0000-0000-0000-170266451900","resource_collection_enabled":true,"tenant_name":"17026645-0000-0000-0000-170266451900"} form: {} headers: Accept: @@ -22,7 +22,7 @@ interactions: status: 200 OK - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078300","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":"17026607-0000-0000-0000-170266078300","new_tenant_name":"17026607-0000-0000-0000-170266078300","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078300"} + {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026645-0000-0000-0000-170266451900","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":"17026645-0000-0000-0000-170266451900","new_tenant_name":"17026645-0000-0000-0000-170266451900","resource_collection_enabled":true,"tenant_name":"17026645-0000-0000-0000-170266451900"} form: {} headers: Accept: @@ -43,7 +43,7 @@ interactions: status: 200 OK - request: body: | - {"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078300","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":"17026607-0000-0000-0000-170266078300","new_tenant_name":"17026607-0000-0000-0000-170266078300","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078300"} + {"client_id":"17026645-0000-0000-0000-170266451900","tenant_name":"17026645-0000-0000-0000-170266451900"} form: {} headers: Accept: diff --git a/tests/scenarios/features/v1/azure_integration.feature b/tests/scenarios/features/v1/azure_integration.feature index d312058e958..eaa91dce651 100644 --- a/tests/scenarios/features/v1/azure_integration.feature +++ b/tests/scenarios/features/v1/azure_integration.feature @@ -34,7 +34,7 @@ Feature: Azure Integration Scenario: Delete an Azure integration returns "OK" response Given there is a valid "azure_account" in the system And new "DeleteAzureIntegration" 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 {"client_id": "{{ uuid }}", "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/undo.json b/tests/scenarios/features/v1/undo.json index 35f8b8ae408..0da29a545bd 100644 --- a/tests/scenarios/features/v1/undo.json +++ b/tests/scenarios/features/v1/undo.json @@ -489,7 +489,7 @@ { "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}" + "template": "{\n \"client_id\": \"{{client_id}}\",\n \"tenant_name\": \"{{tenant_name}}\"\n}" } ], "type": "unsafe"