Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-10-25 13:05:51.926973",
"spec_repo_commit": "a2f558e8"
"regenerated": "2024-10-25 20:17:04.430049",
"spec_repo_commit": "849ce45c"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-25 13:05:51.946255",
"spec_repo_commit": "a2f558e8"
"regenerated": "2024-10-25 20:17:04.448121",
"spec_repo_commit": "849ce45c"
}
}
}
10 changes: 5 additions & 5 deletions tests/scenarios/features/v1/gcp_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a GCP integration returns "OK" response
Given new "CreateGCPIntegration" request
And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "{{unique_hash}}@example.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "host_filters": "key:value,filter:example", "cloud_run_revision_filters": ["dr:dre"], "is_cspm_enabled": true, "is_security_command_center_enabled": true, "is_resource_change_collection_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
Expand All @@ -31,7 +31,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Delete a GCP integration returns "OK" response
Given there is a valid "gcp_account" in the system
And new "DeleteGCPIntegration" request
Expand All @@ -45,13 +45,13 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@replay-only @team:DataDog/gcp-integrations
@skip-terraform-config @team:DataDog/gcp-integrations
Scenario: List all GCP integrations returns "OK" response
Given new "ListGCPIntegration" request
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Update a GCP integration cloud run revision filters returns "OK" response
Given there is a valid "gcp_account" in the system
And new "UpdateGCPIntegration" request
Expand All @@ -66,7 +66,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 400 Bad Request

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Update a GCP integration returns "OK" response
Given there is a valid "gcp_account" in the system
And new "UpdateGCPIntegration" request
Expand Down
24 changes: 12 additions & 12 deletions tests/scenarios/features/v2/gcp_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 409 Conflict

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account returns "OK" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"client_email": "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
Expand All @@ -54,7 +54,7 @@ Feature: GCP Integration
And the response "data.type" is equal to "gcp_service_account"
And the response "data.attributes.client_email" is equal to "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com"

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account with account_tags returns "OK" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"account_tags": ["lorem", "ipsum"], "client_email": "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
Expand All @@ -64,7 +64,7 @@ Feature: GCP Integration
And the response "data.attributes.client_email" is equal to "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com"
And the response "data.attributes.account_tags" is equal to ["lorem", "ipsum"]

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account with cloud run revision filters enabled returns "OK" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"cloud_run_revision_filters": ["meh:bleh"], "client_email": "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
Expand All @@ -74,7 +74,7 @@ Feature: GCP Integration
And the response "data.attributes.client_email" is equal to "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com"
And the response "data.attributes.cloud_run_revision_filters" is equal to ["meh:bleh"]

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account with cspm enabled returns "OK" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"is_cspm_enabled": true, "resource_collection_enabled": true, "client_email": "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
Expand All @@ -84,14 +84,14 @@ Feature: GCP Integration
And the response "data.attributes.client_email" is equal to "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com"
And the response "data.attributes.is_cspm_enabled" is equal to true

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account with resource collection enabled disabled and cspm enabled returns "Bad Request" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"resource_collection_enabled": false, "is_cspm_enabled": true, "client_email": "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
When the request is sent
Then the response status is 400 Bad Request

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account with resource collection enabled returns "OK" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"resource_collection_enabled": true, "client_email": "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
Expand All @@ -101,7 +101,7 @@ Feature: GCP Integration
And the response "data.attributes.client_email" is equal to "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com"
And the response "data.attributes.resource_collection_enabled" is equal to true

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account with security command center enabled returns "OK" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"is_security_command_center_enabled": true, "is_resource_change_collection_enabled": true, "client_email": "Test-{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
Expand Down Expand Up @@ -132,15 +132,15 @@ Feature: GCP Integration
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:DataDog/gcp-integrations
@skip-terraform-config @team:DataDog/gcp-integrations
Scenario: List all GCP STS-enabled service accounts returns "OK" response
Given there is a valid "gcp_sts_account" in the system
And new "ListGCPSTSAccounts" request
When the request is sent
Then the response status is 200 OK
And the response "data" has item with field "type" with value "gcp_service_account"

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: List delegate account returns "OK" response
Given new "GetGCPSTSDelegate" request
When the request is sent
Expand All @@ -163,7 +163,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Update STS Service Account returns "OK" response
Given there is a valid "gcp_sts_account" in the system
And new "UpdateGCPSTSAccount" request
Expand All @@ -172,7 +172,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 201 OK

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Update STS Service Account returns "OK" response with cloud run revision filters
Given there is a valid "gcp_sts_account" in the system
And new "UpdateGCPSTSAccount" request
Expand All @@ -181,7 +181,7 @@ Feature: GCP Integration
When the request is sent
Then the response status is 201 OK

@replay-only @team:DataDog/gcp-integrations
@team:DataDog/gcp-integrations
Scenario: Update STS Service Account returns "OK" response with enable resource collection turned on
Given there is a valid "gcp_sts_account" in the system
And new "UpdateGCPSTSAccount" request
Expand Down
Loading