Skip to content

Commit

Permalink
Fix azure tests to follow new backend validation (#2603)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Jul 25, 2024
1 parent 2d968ac commit 278e7bd
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
2 changes: 1 addition & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/azure-integration/CreateAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/azure-integration/UpdateAzureHostFilters.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/azure-integration/UpdateAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-02-28T20:25:59.580Z
2024-07-25T18:47:35.049Z
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-07-01T18:40:05.567Z
2024-07-25T18:47:35.517Z
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-07-01T18:40:05.942Z
2024-07-25T18:47:35.975Z
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions tests/scenarios/features/v1/azure_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -53,28 +53,28 @@ 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

@team:DataDog/azure-integrations
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
Loading

0 comments on commit 278e7bd

Please sign in to comment.