From ecc12267aa790b94c4a76205eab2447af101cc9e Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 11:15:49 +0200 Subject: [PATCH] Regenerate client from commit 0f6264a5 of spec repo (#1539) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ci.datadog-api-spec Co-authored-by: Thomas Hervé --- .apigentools-info | 8 +-- .../DeleteOpsgenieService.go | 5 +- .../GetOpsgenieService.go | 5 +- .../UpdateOpsgenieService.go | 12 ++-- ..._service_object_returns_OK_response.freeze | 1 + ...le_service_object_returns_OK_response.yaml | 57 ++++++++++++++++++ ..._service_object_returns_OK_response.freeze | 1 + ...le_service_object_returns_OK_response.yaml | 57 ++++++++++++++++++ ...service_objects_returns_OK_response.freeze | 1 + ...l_service_objects_returns_OK_response.yaml | 57 ++++++++++++++++++ ..._service_object_returns_OK_response.freeze | 1 + ...le_service_object_returns_OK_response.yaml | 60 +++++++++++++++++++ .../features/v2/opsgenie_integration.feature | 52 +++++++++------- 13 files changed, 284 insertions(+), 33 deletions(-) create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.yaml diff --git a/.apigentools-info b/.apigentools-info index 67001f9e074..4cf96db5476 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.2", - "regenerated": "2022-06-13 19:23:48.258264", - "spec_repo_commit": "04543c8c" + "regenerated": "2022-06-14 08:16:18.622596", + "spec_repo_commit": "0f6264a5" }, "v2": { "apigentools_version": "1.6.2", - "regenerated": "2022-06-13 19:23:48.270824", - "spec_repo_commit": "04543c8c" + "regenerated": "2022-06-14 08:16:18.634865", + "spec_repo_commit": "0f6264a5" } } } \ No newline at end of file diff --git a/examples/v2/opsgenie-integration/DeleteOpsgenieService.go b/examples/v2/opsgenie-integration/DeleteOpsgenieService.go index 5b0971dd59f..953bb67204e 100644 --- a/examples/v2/opsgenie-integration/DeleteOpsgenieService.go +++ b/examples/v2/opsgenie-integration/DeleteOpsgenieService.go @@ -11,10 +11,13 @@ import ( ) func main() { + // there is a valid "opsgenie_service" in the system + OpsgenieServiceDataID := os.Getenv("OPSGENIE_SERVICE_DATA_ID") + ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - r, err := apiClient.OpsgenieIntegrationApi.DeleteOpsgenieService(ctx, "integration_service_id") + r, err := apiClient.OpsgenieIntegrationApi.DeleteOpsgenieService(ctx, OpsgenieServiceDataID) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OpsgenieIntegrationApi.DeleteOpsgenieService`: %v\n", err) diff --git a/examples/v2/opsgenie-integration/GetOpsgenieService.go b/examples/v2/opsgenie-integration/GetOpsgenieService.go index 49668441092..d211efa340a 100644 --- a/examples/v2/opsgenie-integration/GetOpsgenieService.go +++ b/examples/v2/opsgenie-integration/GetOpsgenieService.go @@ -12,10 +12,13 @@ import ( ) func main() { + // there is a valid "opsgenie_service" in the system + OpsgenieServiceDataID := os.Getenv("OPSGENIE_SERVICE_DATA_ID") + ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - resp, r, err := apiClient.OpsgenieIntegrationApi.GetOpsgenieService(ctx, "integration_service_id") + resp, r, err := apiClient.OpsgenieIntegrationApi.GetOpsgenieService(ctx, OpsgenieServiceDataID) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OpsgenieIntegrationApi.GetOpsgenieService`: %v\n", err) diff --git a/examples/v2/opsgenie-integration/UpdateOpsgenieService.go b/examples/v2/opsgenie-integration/UpdateOpsgenieService.go index 16f985bd302..77cfc6a1133 100644 --- a/examples/v2/opsgenie-integration/UpdateOpsgenieService.go +++ b/examples/v2/opsgenie-integration/UpdateOpsgenieService.go @@ -12,22 +12,24 @@ import ( ) func main() { + // there is a valid "opsgenie_service" in the system + OpsgenieServiceDataID := os.Getenv("OPSGENIE_SERVICE_DATA_ID") + body := datadog.OpsgenieServiceUpdateRequest{ Data: datadog.OpsgenieServiceUpdateData{ Attributes: datadog.OpsgenieServiceUpdateAttributes{ - CustomUrl: *datadog.NewNullableString(datadog.PtrString("https://example.com")), - Name: datadog.PtrString("fake-opsgenie-service-name"), + Name: datadog.PtrString("fake-opsgenie-service-name--updated"), OpsgenieApiKey: datadog.PtrString("00000000-0000-0000-0000-000000000000"), - Region: datadog.OPSGENIESERVICEREGIONTYPE_US.Ptr(), + Region: datadog.OPSGENIESERVICEREGIONTYPE_EU.Ptr(), }, - Id: "596da4af-0563-4097-90ff-07230c3f9db3", + Id: OpsgenieServiceDataID, Type: datadog.OPSGENIESERVICETYPE_OPSGENIE_SERVICE, }, } ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - resp, r, err := apiClient.OpsgenieIntegrationApi.UpdateOpsgenieService(ctx, "integration_service_id", body) + resp, r, err := apiClient.OpsgenieIntegrationApi.UpdateOpsgenieService(ctx, OpsgenieServiceDataID, body) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OpsgenieIntegrationApi.UpdateOpsgenieService`: %v\n", err) diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.freeze new file mode 100644 index 00000000000..270ba993ecd --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-06-13T14:58:47.066Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.yaml new file mode 100644 index 00000000000..62135169446 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Delete_a_single_service_object_returns_OK_response.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"name":"Test-Delete_a_single_service_object_returns_OK_response-1655132327","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services + response: + body: '{"data":{"attributes":{"region":"us","name":"Test-Delete_a_single_service_object_returns_OK_response-1655132327","custom_url":null},"type":"opsgenie-service","id":"78050750-0312-400d-ad80-161ea7900931"}} + + ' + code: 201 + duration: '' + headers: + Content-Type: + - application/json + status: 201 Created +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/78050750-0312-400d-ad80-161ea7900931 + response: + body: '' + code: 204 + duration: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: 204 No Content +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/78050750-0312-400d-ad80-161ea7900931 + response: + body: '{"errors":["Service not found."]} + + ' + code: 404 + duration: '' + headers: + Content-Type: + - application/json + status: 404 Not Found +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.freeze new file mode 100644 index 00000000000..3d4aa570a8a --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-06-13T14:58:47.782Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.yaml new file mode 100644 index 00000000000..79e5c0ec3a2 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_a_single_service_object_returns_OK_response.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"name":"Test-Get_a_single_service_object_returns_OK_response-1655132327","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services + response: + body: '{"data":{"attributes":{"region":"us","name":"Test-Get_a_single_service_object_returns_OK_response-1655132327","custom_url":null},"type":"opsgenie-service","id":"3ca2db9d-e088-47d1-9bfe-b88463c23f2d"}} + + ' + code: 201 + duration: '' + headers: + Content-Type: + - application/json + status: 201 Created +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: GET + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/3ca2db9d-e088-47d1-9bfe-b88463c23f2d + response: + body: '{"data":{"attributes":{"region":"us","name":"Test-Get_a_single_service_object_returns_OK_response-1655132327","custom_url":null},"type":"opsgenie-service","id":"3ca2db9d-e088-47d1-9bfe-b88463c23f2d"}} + + ' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/3ca2db9d-e088-47d1-9bfe-b88463c23f2d + response: + body: '' + code: 204 + duration: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: 204 No Content +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.freeze new file mode 100644 index 00000000000..f955a384205 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-06-13T14:58:48.657Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.yaml new file mode 100644 index 00000000000..794c2544e6d --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Get_all_service_objects_returns_OK_response.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"name":"Test-Get_all_service_objects_returns_OK_response-1655132328","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services + response: + body: '{"data":{"attributes":{"region":"us","name":"Test-Get_all_service_objects_returns_OK_response-1655132328","custom_url":null},"type":"opsgenie-service","id":"337861b6-ed46-4c66-b4a0-32d7a4ba94b9"}} + + ' + code: 201 + duration: '' + headers: + Content-Type: + - application/json + status: 201 Created +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: GET + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services + response: + body: '{"data":[{"attributes":{"region":"us","name":"Test-Get_all_service_objects_returns_OK_response-1655132328","custom_url":null},"type":"opsgenie-service","id":"337861b6-ed46-4c66-b4a0-32d7a4ba94b9"}]} + + ' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/337861b6-ed46-4c66-b4a0-32d7a4ba94b9 + response: + body: '' + code: 204 + duration: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: 204 No Content +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.freeze new file mode 100644 index 00000000000..56a922412bd --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.freeze @@ -0,0 +1 @@ +2022-06-09T19:57:06.404Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.yaml new file mode 100644 index 00000000000..55dc6dce169 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Opsgenie_Integration/Scenario_Update_a_single_service_object_returns_OK_response.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"name":"Test-Update_a_single_service_object_returns_OK_response-1654804626","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"us"},"type":"opsgenie-service"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services + response: + body: '{"data":{"attributes":{"region":"us","name":"Test-Update_a_single_service_object_returns_OK_response-1654804626","custom_url":null},"type":"opsgenie-service","id":"0b04ddfb-b00a-4243-baed-33ff1bff0909"}} + + ' + code: 201 + duration: '' + headers: + Content-Type: + - application/json + status: 201 Created +- request: + body: | + {"data":{"attributes":{"name":"Test-Update_a_single_service_object_returns_OK_response-1654804626--updated","opsgenie_api_key":"00000000-0000-0000-0000-000000000000","region":"eu"},"id":"0b04ddfb-b00a-4243-baed-33ff1bff0909","type":"opsgenie-service"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/0b04ddfb-b00a-4243-baed-33ff1bff0909 + response: + body: '{"data":{"attributes":{"region":"eu","name":"Test-Update_a_single_service_object_returns_OK_response-1654804626--updated","custom_url":null},"type":"opsgenie-service","id":"0b04ddfb-b00a-4243-baed-33ff1bff0909"}} + + ' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v2/integration/opsgenie/services/0b04ddfb-b00a-4243-baed-33ff1bff0909 + response: + body: '' + code: 204 + duration: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: 204 No Content +version: 1 diff --git a/tests/scenarios/features/v2/opsgenie_integration.feature b/tests/scenarios/features/v2/opsgenie_integration.feature index effec1eb729..bc2be8ff555 100644 --- a/tests/scenarios/features/v2/opsgenie_integration.feature +++ b/tests/scenarios/features/v2/opsgenie_integration.feature @@ -9,10 +9,10 @@ Feature: Opsgenie Integration And a valid "appKeyAuth" key in the system And an instance of "OpsgenieIntegration" API - @generated @skip @team:Datadog/collaboration-integrations + @skip @team:Datadog/collaboration-integrations Scenario: Create a new service object returns "Bad Request" response Given new "CreateOpsgenieService" request - And body with value {"data": {"attributes": {"custom_url": "https://example.com", "name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "type": "opsgenie-service"}} + And body with value {"data": {"attributes": {"name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "type": "opsgenie-service"}} When the request is sent Then the response status is 400 Bad Request @@ -25,10 +25,10 @@ Feature: Opsgenie Integration And the response "data.attributes.name" is equal to "{{unique}}" And the response "data.attributes.region" is equal to "us" - @generated @skip @team:Datadog/collaboration-integrations + @skip @team:Datadog/collaboration-integrations Scenario: Create a new service object returns "Conflict" response Given new "CreateOpsgenieService" request - And body with value {"data": {"attributes": {"custom_url": "https://example.com", "name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "type": "opsgenie-service"}} + And body with value {"data": {"attributes": {"name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "type": "opsgenie-service"}} When the request is sent Then the response status is 409 Conflict @@ -46,10 +46,11 @@ Feature: Opsgenie Integration When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/collaboration-integrations + @team:Datadog/collaboration-integrations Scenario: Delete a single service object returns "OK" response - Given new "DeleteOpsgenieService" request - And request contains "integration_service_id" parameter from "REPLACE.ME" + Given there is a valid "opsgenie_service" in the system + And new "DeleteOpsgenieService" request + And request contains "integration_service_id" parameter from "opsgenie_service.data.id" When the request is sent Then the response status is 204 OK @@ -74,47 +75,54 @@ Feature: Opsgenie Integration When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/collaboration-integrations + @team:Datadog/collaboration-integrations Scenario: Get a single service object returns "OK" response - Given new "GetOpsgenieService" request - And request contains "integration_service_id" parameter from "REPLACE.ME" + Given there is a valid "opsgenie_service" in the system + And new "GetOpsgenieService" request + And request contains "integration_service_id" parameter from "opsgenie_service.data.id" When the request is sent Then the response status is 200 OK + And the response "data.attributes.name" has the same value as "opsgenie_service.data.attributes.name" + And the response "data.attributes.region" is equal to "us" - @generated @skip @team:Datadog/collaboration-integrations + @team:Datadog/collaboration-integrations Scenario: Get all service objects returns "OK" response - Given new "ListOpsgenieServices" request + Given there is a valid "opsgenie_service" in the system + And new "ListOpsgenieServices" request When the request is sent Then the response status is 200 OK - @generated @skip @team:Datadog/collaboration-integrations + @skip @team:Datadog/collaboration-integrations Scenario: Update a single service object returns "Bad Request" response Given new "UpdateOpsgenieService" request And request contains "integration_service_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"custom_url": "https://example.com", "name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service"}} + And body with value {"data": {"attributes": {"name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service"}} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:Datadog/collaboration-integrations + @skip @team:Datadog/collaboration-integrations Scenario: Update a single service object returns "Conflict" response Given new "UpdateOpsgenieService" request And request contains "integration_service_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"custom_url": "https://example.com", "name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service"}} + And body with value {"data": {"attributes": {"name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service"}} When the request is sent Then the response status is 409 Conflict - @generated @skip @team:Datadog/collaboration-integrations + @skip @team:Datadog/collaboration-integrations Scenario: Update a single service object returns "Not Found" response Given new "UpdateOpsgenieService" request And request contains "integration_service_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"custom_url": "https://example.com", "name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service"}} + And body with value {"data": {"attributes": {"name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service"}} When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/collaboration-integrations + @team:Datadog/collaboration-integrations Scenario: Update a single service object returns "OK" response - Given new "UpdateOpsgenieService" request - And request contains "integration_service_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"custom_url": "https://example.com", "name": "fake-opsgenie-service-name", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service"}} + Given there is a valid "opsgenie_service" in the system + And new "UpdateOpsgenieService" request + And request contains "integration_service_id" parameter from "opsgenie_service.data.id" + And body with value {"data": {"attributes": {"name": "{{ opsgenie_service.data.attributes.name }}--updated", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "eu"}, "id": "{{opsgenie_service.data.id}}", "type": "opsgenie-service"}} When the request is sent Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{ opsgenie_service.data.attributes.name }}--updated" + And the response "data.attributes.region" is equal to "eu"