You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/v2/gcp_integration.feature
+23-6Lines changed: 23 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -34,26 +34,43 @@ Feature: GCP Integration
34
34
@generated@skip@team:DataDog/gcp-integrations
35
35
Scenario: Create a new entry for your service account returns "Bad Request" response
36
36
Given new "CreateGCPSTSAccount" request
37
-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
37
+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
38
38
When the request is sent
39
39
Then the response status is 400 Bad Request
40
40
41
41
@generated@skip@team:DataDog/gcp-integrations
42
42
Scenario: Create a new entry for your service account returns "Conflict" response
43
43
Given new "CreateGCPSTSAccount" request
44
-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
44
+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
45
45
When the request is sent
46
46
Then the response status is 409 Conflict
47
47
48
-
@skip-validation@team:DataDog/gcp-integrations
48
+
@team:DataDog/gcp-integrations
49
49
Scenario: Create a new entry for your service account returns "OK" response
50
50
Given new "CreateGCPSTSAccount" request
51
-
And body with value {"data": {"attributes": {"client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
51
+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
52
52
When the request is sent
53
53
Then the response status is 201 OK
54
54
And the response "data.type" is equal to "gcp_service_account"
55
55
And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com"
56
56
57
+
@skip@team:DataDog/gcp-integrations
58
+
Scenario: Create a new entry for your service account with account_tags returns "OK" response
59
+
Given new "CreateGCPSTSAccount" request
60
+
And body with value {"data": {"attributes": {"account_tags": ["lorem", "ipsum"], "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
61
+
When the request is sent
62
+
Then the response status is 201 OK
63
+
And the response "data.type" is equal to "gcp_service_account"
64
+
And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com"
65
+
And the response "data.attributes.account_tags" is equal to ["lorem", "ipsum"]
66
+
67
+
@team:DataDog/gcp-integrations
68
+
Scenario: Create a new entry for your service account with bad account_tags returns "Bad Request" response
69
+
Given new "CreateGCPSTSAccount" request
70
+
And body with value {"data": {"attributes": {"account_tags": "BAD", "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
Scenario: Update STS Service Account returns "Bad Request" response
94
111
Given new "UpdateGCPSTSAccount" request
95
112
And request contains "account_id" parameter from "REPLACE.ME"
96
-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
113
+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
97
114
When the request is sent
98
115
Then the response status is 400 Bad Request
99
116
100
117
@generated@skip@team:DataDog/gcp-integrations
101
118
Scenario: Update STS Service Account returns "Not Found" response
102
119
Given new "UpdateGCPSTSAccount" request
103
120
And request contains "account_id" parameter from "REPLACE.ME"
104
-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
121
+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
0 commit comments