Skip to content

Commit

Permalink
Fix GCP CSPM test in Java (#1805)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
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 authored Dec 15, 2023
1 parent 81796b3 commit cb9ee82
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 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": "2023-12-14 19:38:24.188378",
"spec_repo_commit": "cdc82e06"
"regenerated": "2023-12-15 15:50:51.303374",
"spec_repo_commit": "56bcf717"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-14 19:38:24.201899",
"spec_repo_commit": "cdc82e06"
"regenerated": "2023-12-15 15:50:51.318688",
"spec_repo_commit": "56bcf717"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
data=GCPSTSServiceAccountData(
attributes=GCPSTSServiceAccountAttributes(
is_cspm_enabled=True,
resource_collection_enabled=True,
client_email="[email protected]",
host_filters=[],
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-13T21:29:09.202Z
2023-12-15T08:45:38.020Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"data":{"attributes":{"client_email":"dfb9f119aee90526@test-project.iam.gserviceaccount.com","host_filters":[],"is_cspm_enabled":true},"type":"gcp_service_account"}}'
body: '{"data":{"attributes":{"client_email":"9f53cbf93a21704b@test-project.iam.gserviceaccount.com","host_filters":[],"is_cspm_enabled":true,"resource_collection_enabled":true},"type":"gcp_service_account"}}'
headers:
accept:
- application/json
Expand All @@ -10,7 +10,7 @@ interactions:
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts
response:
body:
string: '{"data":{"type":"gcp_service_account","attributes":{"is_security_command_center_enabled":false,"resource_collection_enabled":true,"is_cspm_enabled":true,"client_email":"dfb9f119aee90526@test-project.iam.gserviceaccount.com","account_tags":[],"automute":false,"host_filters":[]},"id":"d2ef6458-62a4-4fbe-ad48-9429baa01867"}}
string: '{"data":{"type":"gcp_service_account","attributes":{"is_cspm_enabled":true,"account_tags":[],"host_filters":[],"resource_collection_enabled":true,"is_security_command_center_enabled":false,"client_email":"9f53cbf93a21704b@test-project.iam.gserviceaccount.com","automute":false},"id":"cf3c6e32-dad2-452e-8c09-f34c5f2211a1"}}
'
headers:
Expand All @@ -25,7 +25,7 @@ interactions:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts/d2ef6458-62a4-4fbe-ad48-9429baa01867
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts/cf3c6e32-dad2-452e-8c09-f34c5f2211a1
response:
body:
string: ''
Expand Down
2 changes: 1 addition & 1 deletion tests/v2/features/gcp_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Feature: GCP Integration
@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, "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
And body with value {"data": {"attributes": {"is_cspm_enabled": true, "resource_collection_enabled": true, "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
When the request is sent
Then the response status is 201 OK
And the response "data.type" is equal to "gcp_service_account"
Expand Down

0 comments on commit cb9ee82

Please sign in to comment.