Skip to content

Commit 34ac79f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Enable gcp tests (#1812)
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>
1 parent 289c0a5 commit 34ac79f

15 files changed

+231
-40
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2023-12-18 13:46:53.516392",
8-
"spec_repo_commit": "f363f7b4"
7+
"regenerated": "2023-12-20 13:53:17.396665",
8+
"spec_repo_commit": "1e75e401"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-12-18 13:46:53.531307",
13-
"spec_repo_commit": "f363f7b4"
12+
"regenerated": "2023-12-20 13:53:17.411015",
13+
"spec_repo_commit": "1e75e401"
1414
}
1515
}
1616
}

examples/v1/gcp-integration/CreateGCPIntegration.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
body = GCPAccount(
1010
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
1111
auth_uri="https://accounts.google.com/o/oauth2/auth",
12-
client_email="[email protected].com",
13-
client_id="123456712345671234567",
12+
client_email="252bf553ef04b351@example.com",
13+
client_id="163662907116366290710",
1414
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
15-
errors=[
16-
"*",
17-
],
1815
host_filters="key:value,filter:example",
1916
is_cspm_enabled=True,
2017
is_security_command_center_enabled=True,

examples/v1/gcp-integration/DeleteGCPIntegration.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,9 @@
77
from datadog_api_client.v1.model.gcp_account import GCPAccount
88

99
body = GCPAccount(
10-
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
11-
auth_uri="https://accounts.google.com/o/oauth2/auth",
12-
client_email="[email protected]",
13-
client_id="123456712345671234567",
14-
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
15-
errors=[
16-
"*",
17-
],
18-
host_filters="key:value,filter:example",
19-
is_cspm_enabled=True,
20-
is_security_command_center_enabled=True,
21-
private_key="private_key",
22-
private_key_id="123456789abcdefghi123456789abcdefghijklm",
10+
client_email="[email protected]",
11+
client_id="163662907116366290710",
2312
project_id="datadog-apitest",
24-
resource_collection_enabled=True,
25-
token_uri="https://accounts.google.com/o/oauth2/token",
26-
type="service_account",
2713
)
2814

2915
configuration = Configuration()

examples/v1/gcp-integration/UpdateGCPIntegration.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
body = GCPAccount(
1010
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
1111
auth_uri="https://accounts.google.com/o/oauth2/auth",
12-
client_email="[email protected].com",
13-
client_id="123456712345671234567",
12+
client_email="252bf553ef04b351@example.com",
13+
client_id="163662907116366290710",
1414
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
15-
errors=[
16-
"*",
17-
],
1815
host_filters="key:value,filter:example",
1916
is_cspm_enabled=True,
2017
is_security_command_center_enabled=True,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-12-20T13:18:07.717Z
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
interactions:
2+
- request:
3+
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"170307828717030782870","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_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"}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v1/integration/gcp
11+
response:
12+
body:
13+
string: '{}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: '{"client_email":"[email protected]","client_id":"170307828717030782870","project_id":"datadog-apitest"}'
24+
headers:
25+
accept:
26+
- application/json
27+
content-type:
28+
- application/json
29+
method: DELETE
30+
uri: https://api.datadoghq.com/api/v1/integration/gcp
31+
response:
32+
body:
33+
string: '{}
34+
35+
'
36+
headers:
37+
content-type:
38+
- application/json
39+
status:
40+
code: 200
41+
message: OK
42+
version: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-12-20T13:20:18.421Z
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
interactions:
2+
- request:
3+
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"[email protected]","client_id":"170307841817030784180","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_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"}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v1/integration/gcp
11+
response:
12+
body:
13+
string: '{}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: '{"client_email":"[email protected]","client_id":"170307841817030784180","project_id":"datadog-apitest"}'
24+
headers:
25+
accept:
26+
- application/json
27+
content-type:
28+
- application/json
29+
method: DELETE
30+
uri: https://api.datadoghq.com/api/v1/integration/gcp
31+
response:
32+
body:
33+
string: '{}
34+
35+
'
36+
headers:
37+
content-type:
38+
- application/json
39+
status:
40+
code: 200
41+
message: OK
42+
- request:
43+
body: '{"client_email":"[email protected]","client_id":"170307841817030784180","project_id":"datadog-apitest"}'
44+
headers:
45+
accept:
46+
- application/json
47+
content-type:
48+
- application/json
49+
method: DELETE
50+
uri: https://api.datadoghq.com/api/v1/integration/gcp
51+
response:
52+
body:
53+
string: '{}
54+
55+
'
56+
headers:
57+
content-type:
58+
- application/json
59+
status:
60+
code: 200
61+
message: OK
62+
version: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-12-20T13:44:06.411Z

tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.yaml

Lines changed: 20 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)