From 52b366c053bba44872e576b02f08820c9bc31858 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 19 Dec 2023 17:42:21 +0000 Subject: [PATCH] Regenerate client from commit 1cfce136 of spec repo --- .apigentools-info | 8 +-- .../gcp-integration/CreateGCPIntegration.py | 2 +- .../gcp-integration/DeleteGCPIntegration.py | 16 +---- .../gcp-integration/UpdateGCPIntegration.py | 2 +- ...gcp_integration_returns_ok_response.frozen | 1 + ...a_gcp_integration_returns_ok_response.yaml | 42 +++++++++++++ ...gcp_integration_returns_ok_response.frozen | 1 + ...a_gcp_integration_returns_ok_response.yaml | 62 +++++++++++++++++++ ...cp_integrations_returns_ok_response.frozen | 1 + ..._gcp_integrations_returns_ok_response.yaml | 20 ++++++ ...gcp_integration_returns_ok_response.frozen | 1 + ...a_gcp_integration_returns_ok_response.yaml | 62 +++++++++++++++++++ tests/v1/features/gcp_integration.feature | 20 +++--- tests/v1/features/given.json | 13 ++++ tests/v1/features/undo.json | 8 ++- 15 files changed, 228 insertions(+), 31 deletions(-) create mode 100644 tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.frozen create mode 100644 tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.yaml create mode 100644 tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.frozen create mode 100644 tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.yaml create mode 100644 tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.frozen create mode 100644 tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.yaml create mode 100644 tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.frozen create mode 100644 tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.yaml diff --git a/.apigentools-info b/.apigentools-info index 19988b12fd..3a6a8021a2 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-18 13:46:53.516392", - "spec_repo_commit": "f363f7b4" + "regenerated": "2023-12-19 17:41:48.023623", + "spec_repo_commit": "1cfce136" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-18 13:46:53.531307", - "spec_repo_commit": "f363f7b4" + "regenerated": "2023-12-19 17:41:48.037642", + "spec_repo_commit": "1cfce136" } } } \ No newline at end of file diff --git a/examples/v1/gcp-integration/CreateGCPIntegration.py b/examples/v1/gcp-integration/CreateGCPIntegration.py index d72cde916a..5d315fe9b9 100644 --- a/examples/v1/gcp-integration/CreateGCPIntegration.py +++ b/examples/v1/gcp-integration/CreateGCPIntegration.py @@ -10,7 +10,7 @@ auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs", auth_uri="https://accounts.google.com/o/oauth2/auth", client_email="api-dev@datadog-sandbox.iam.gserviceaccount.com", - client_id="123456712345671234567", + client_id="163662907116366290710", client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", errors=[ "*", diff --git a/examples/v1/gcp-integration/DeleteGCPIntegration.py b/examples/v1/gcp-integration/DeleteGCPIntegration.py index a7a5ee90dc..e98980e1ff 100644 --- a/examples/v1/gcp-integration/DeleteGCPIntegration.py +++ b/examples/v1/gcp-integration/DeleteGCPIntegration.py @@ -7,23 +7,9 @@ from datadog_api_client.v1.model.gcp_account import GCPAccount body = GCPAccount( - auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs", - auth_uri="https://accounts.google.com/o/oauth2/auth", client_email="api-dev@datadog-sandbox.iam.gserviceaccount.com", - client_id="123456712345671234567", - client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", - errors=[ - "*", - ], - host_filters="key:value,filter:example", - is_cspm_enabled=True, - is_security_command_center_enabled=True, - private_key="private_key", - private_key_id="123456789abcdefghi123456789abcdefghijklm", + client_id="163662907116366290710", project_id="datadog-apitest", - resource_collection_enabled=True, - token_uri="https://accounts.google.com/o/oauth2/token", - type="service_account", ) configuration = Configuration() diff --git a/examples/v1/gcp-integration/UpdateGCPIntegration.py b/examples/v1/gcp-integration/UpdateGCPIntegration.py index 8685b1c3c7..bd7ae9b154 100644 --- a/examples/v1/gcp-integration/UpdateGCPIntegration.py +++ b/examples/v1/gcp-integration/UpdateGCPIntegration.py @@ -10,7 +10,7 @@ auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs", auth_uri="https://accounts.google.com/o/oauth2/auth", client_email="api-dev@datadog-sandbox.iam.gserviceaccount.com", - client_id="123456712345671234567", + client_id="163662907116366290710", client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", errors=[ "*", diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.frozen new file mode 100644 index 0000000000..31786d8112 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.frozen @@ -0,0 +1 @@ +2023-12-19T17:22:57.180Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.yaml new file mode 100644 index 0000000000..6b8a34d745 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_gcp_integration_returns_ok_response.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657717030065770","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","errors":["*"],"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"}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657717030065770","project_id":"datadog-apitest"}' + headers: + accept: + - application/json + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.frozen new file mode 100644 index 0000000000..b43e41228e --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.frozen @@ -0,0 +1 @@ +2023-12-19T17:22:58.040Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.yaml new file mode 100644 index 0000000000..f731fd79ce --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_delete_a_gcp_integration_returns_ok_response.yaml @@ -0,0 +1,62 @@ +interactions: +- request: + body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657817030065780","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","errors":["*"],"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"}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657817030065780","project_id":"datadog-apitest"}' + headers: + accept: + - application/json + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657817030065780","project_id":"datadog-apitest"}' + headers: + accept: + - application/json + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.frozen new file mode 100644 index 0000000000..bf33bc17b5 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.frozen @@ -0,0 +1 @@ +2023-12-19T17:22:59.168Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.yaml new file mode 100644 index 0000000000..8843ca9206 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_list_all_gcp_integrations_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '[{"project_id":"","client_email":"00981e1c3e8e97a1@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"02c9828017e15aa5@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"097c90af04124b05@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"0f08d4423223120b@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"1085f36962d101c9@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"10e47d352952f506@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"11f4e1b9c5ec0832@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"14a023b819befe53@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"1662faf86d58e1b7@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"18bae0a9a8846c9e@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"1c5b52e7576334d2@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"1e4805f564fa2ac9@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"1fad1b27edb5bcf2@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"208ee5ed66d71133@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"219d10ddeed283a3@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"23a5556b778915be@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"24e9015e320313f8@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"277a44a2d4070df0@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"28dcbaecc6090d7e@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"2b826cc0d80181ba@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"2e67a657a5e9e7c0@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"2e9d423e7aa1f482@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"2fa0809e16b17119@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"3084fcf0ee31eb0c@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"363b41762d905e45@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"3731304188d2cf16@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"3da4c7006b369ab8@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"3ecc38b6941b8636@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"4480243013d4e5f2@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"46fe7f297cbf4352@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"4d16a20f9531ae34@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"4f72cf81bddbbdce@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"4f9c2129311f67c8@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"4fd2c5373c504d3d@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"54e6214d4e37c221@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"558219f266cb5661@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"567f48bf35496e63@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"59fd6255ff318598@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"5f67543f83a9f8fe@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"5fcbbd9fd2b05a98@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"6287c3a6f90577f5@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"6310e1f5179a6f81@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"7468db1f938c7a5b@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"792047232a0ee446@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"79fd7f289d3e203c@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"7e829bef04cabf05@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"7f0d1446a2b36412@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"800d8f61bc1b1f11@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"80c76870b798470e@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"856a341306f76135@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"85eec49aa13601a0@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"86fffdf0a2f9c120@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"8b77145ab254af0e@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"900221429a54e8c9@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"9090d908de5494b0@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"9152c07ea52b6ebf@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"92357e402dc93e16@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"936c176ea8d149f5@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"96942532bb1c698b@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"977541a023419b38@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"9822a7b951c1749b@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"99d25eaedaa0b964@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"9af8703db57f8adc@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"9b15d9c0b38905fc@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"9c20e39790e74a9a@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"a2920570daa112f1@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"a75bd581627e2019@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"a8045bf0668414a0@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"a8c4c1d81bd7f901@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"a8cd678d02a877ef@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"a951ac716618bc39@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"aaf327e22d3addd3@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"ac1de3dc0c8bd5db@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"ad33d7633503bf99@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"ad427d0e856cbbd6@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b10d6276ad2a39ce@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b15d65667f94645a@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b1faa95226c9e32f@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b402406faf436ec7@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b425753d70134965@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b5c318c34c295312@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b79dded205ad0ca0@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"b9e7fdcb3de4199e@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"c5758874111f033d@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"c5bb8a766c0da9b1@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"c65984c4759a8081@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"c765735adb6c4448@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"cb871a85cdddf23d@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"cc34eb2339b0758e@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"cea03370bad43fa8@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"d2aee02f16a95eb6@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"d497d8ae666e8c67@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"d5545b6ffc57e4c1@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"d6fe27adfb2c76ef@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"daeaffdee8f68e43@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"dc167bde560cc8ec@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"dc51b5741de8e6ea@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"df3af5ae9cb794e2@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"e307c0141d0b0056@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"e518c87ea9f81132@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"e541c487131dcfac@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"e86657afbbcc662e@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"eab76a9567596ffc@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"edbc8f8058581958@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"ededfe06c277b8b4@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"f4a3cca553ea085e@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"f938e794b0925958@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"fb67d7b98cd68c2d@example.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"fbde34a142d42679@test-project.iam.gserviceaccount.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"","client_email":"service-account@iam-service-google.com","host_filters":"","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699099608","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699099608@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699101380","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699101380@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699101466","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699101466@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699143227","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699143227@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699144985","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699144985@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699145097","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699145097@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699186355","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699186355@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699187247","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699187247@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]},{"project_id":"tf-TestAccDatadogIntegrationGCP-local-1699187275","client_email":"tf-TestAccDatadogIntegrationGCP-local-1699187275@awesome-project-id.iam.gserviceaccount.com","host_filters":"foo:bar,buzz:lightyear","automute":false,"is_cspm_enabled":false,"resource_collection_enabled":false,"is_security_command_center_enabled":false,"errors":[]}] + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.frozen new file mode 100644 index 0000000000..4d7d6e595c --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.frozen @@ -0,0 +1 @@ +2023-12-19T17:22:59.914Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.yaml new file mode 100644 index 0000000000..a9d55f9bba --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_update_a_gcp_integration_returns_ok_response.yaml @@ -0,0 +1,62 @@ +interactions: +- request: + body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657917030065790","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","errors":["*"],"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"}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657917030065790","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","errors":["*"],"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"}' + headers: + accept: + - application/json + content-type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"client_email":"api-dev@datadog-sandbox.iam.gserviceaccount.com","client_id":"170300657917030065790","project_id":"datadog-apitest"}' + headers: + accept: + - application/json + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/integration/gcp + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/features/gcp_integration.feature b/tests/v1/features/gcp_integration.feature index 72a1bd7dbc..6f07b02443 100644 --- a/tests/v1/features/gcp_integration.feature +++ b/tests/v1/features/gcp_integration.feature @@ -17,10 +17,10 @@ Feature: GCP Integration When the request is sent Then the response status is 400 Bad Request - @generated @skip @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": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "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"} + 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": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "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"} When the request is sent Then the response status is 200 OK @@ -31,10 +31,11 @@ Feature: GCP Integration When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/gcp-integrations + @team:DataDog/gcp-integrations Scenario: Delete a GCP integration returns "OK" response - Given new "DeleteGCPIntegration" 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": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "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"} + Given there is a valid "gcp_account" in the system + And new "DeleteGCPIntegration" request + And body with value {"client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "project_id": "datadog-apitest"} When the request is sent Then the response status is 200 OK @@ -44,7 +45,7 @@ Feature: GCP Integration When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/gcp-integrations + @team:DataDog/gcp-integrations Scenario: List all GCP integrations returns "OK" response Given new "ListGCPIntegration" request When the request is sent @@ -57,9 +58,10 @@ Feature: GCP Integration When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/gcp-integrations + @team:DataDog/gcp-integrations Scenario: Update a GCP integration returns "OK" response - Given new "UpdateGCPIntegration" 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": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "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"} + Given there is a valid "gcp_account" in the system + And new "UpdateGCPIntegration" 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": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "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"} When the request is sent Then the response status is 200 OK diff --git a/tests/v1/features/given.json b/tests/v1/features/given.json index ec3069d70c..bfe02094d4 100644 --- a/tests/v1/features/given.json +++ b/tests/v1/features/given.json @@ -125,6 +125,19 @@ "tag": "Azure Integration", "operationId": "CreateAzureIntegration" }, + { + "parameters": [ + { + "name": "body", + "origin": "request", + "value": "{\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"client_email\": \"api-dev@datadog-sandbox.iam.gserviceaccount.com\",\n \"client_id\": \"{{ timestamp(\"now\") }}{{ timestamp(\"now\") }}0\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL\",\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"is_cspm_enabled\": true,\n \"is_security_command_center_enabled\": true,\n \"private_key\": \"private_key\",\n \"private_key_id\": \"123456789abcdefghi123456789abcdefghijklm\",\n \"project_id\": \"datadog-apitest\",\n \"resource_collection_enabled\": true,\n \"token_uri\": \"https://accounts.google.com/o/oauth2/token\",\n \"type\": \"service_account\"\n}" + } + ], + "step": "there is a valid \"gcp_account\" in the system", + "key": "gcp_account", + "tag": "GCP Integration", + "operationId": "CreateGCPIntegration" + }, { "parameters": [ { diff --git a/tests/v1/features/undo.json b/tests/v1/features/undo.json index 0da29a545b..26834c705c 100644 --- a/tests/v1/features/undo.json +++ b/tests/v1/features/undo.json @@ -523,7 +523,13 @@ "tag": "GCP Integration", "undo": { "operationId": "DeleteGCPIntegration", - "parameters": [], + "parameters": [ + { + "name": "body", + "origin": "request", + "template": "{\"client_email\": \"{{ client_email }}\", \"client_id\": \"{{ client_id }}\", \"project_id\": \"{{ project_id }}\"}" + } + ], "type": "unsafe" } },