From d02f0a6ddd850ba618f75f63de883fb97206cd3a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 6 Aug 2024 12:14:08 +0000 Subject: [PATCH] Regenerate client from commit b4de72c1 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 16 +++ .../Get-a-synthetics-monitor-s-details.frozen | 2 +- .../Get-a-synthetics-monitor-s-details.yml | 28 +++-- ...I-HTTP-test-has-bodyHash-filled-out.frozen | 2 +- ...-API-HTTP-test-has-bodyHash-filled-out.yml | 20 +-- ...s-the-created-test-details-response.frozen | 2 +- ...urns-the-created-test-details-response.yml | 20 +-- ...dit-an-API-test-returns-OK-response.frozen | 2 +- .../Edit-an-API-test-returns-OK-response.yml | 34 ++--- ...-Synthetic-test-returns-OK-response.frozen | 2 +- ...h-a-Synthetic-test-returns-OK-response.yml | 31 ++--- ...Synthetic-tests-returns-OK-response.frozen | 2 +- ...er-Synthetic-tests-returns-OK-response.yml | 26 ++-- .../CreateSyntheticsAPITest_1487281163.rb | 4 + .../CreateSyntheticsAPITest_1987645492.rb | 4 + features/v1/given.json | 2 +- .../v1/synthetics_api_http_test_payload.json | 11 +- lib/datadog_api_client/inflector.rb | 1 + .../v1/models/synthetics_assertion.rb | 3 +- .../models/synthetics_assertion_javascript.rb | 119 ++++++++++++++++++ .../v1/models/synthetics_assertion_type.rb | 1 + 22 files changed, 254 insertions(+), 86 deletions(-) create mode 100644 lib/datadog_api_client/v1/models/synthetics_assertion_javascript.rb diff --git a/.apigentools-info b/.apigentools-info index ac72c94eba14..d021778b1b10 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-05 16:34:57.938972", - "spec_repo_commit": "578f6c8c" + "regenerated": "2024-08-06 12:13:43.883503", + "spec_repo_commit": "b4de72c1" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-05 16:34:57.957171", - "spec_repo_commit": "578f6c8c" + "regenerated": "2024-08-06 12:13:43.901349", + "spec_repo_commit": "b4de72c1" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 1694c6267d21..120ec0c977b0 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -13818,6 +13818,7 @@ components: - $ref: '#/components/schemas/SyntheticsAssertionJSONPathTarget' - $ref: '#/components/schemas/SyntheticsAssertionJSONSchemaTarget' - $ref: '#/components/schemas/SyntheticsAssertionXPathTarget' + - $ref: '#/components/schemas/SyntheticsAssertionJavascript' SyntheticsAssertionBodyHashOperator: description: Assertion operator to apply. enum: @@ -13934,6 +13935,19 @@ components: metaSchema: $ref: '#/components/schemas/SyntheticsAssertionJSONSchemaMetaSchema' type: object + SyntheticsAssertionJavascript: + description: A JavaScript assertion. + properties: + code: + description: The JavaScript code that performs the assertions. + example: dd.expect(dd.response.statusCode).to.equal(200); + type: string + type: + $ref: '#/components/schemas/SyntheticsAssertionType' + required: + - type + - code + type: object SyntheticsAssertionOperator: description: Assertion operator to apply. enum: @@ -14021,6 +14035,7 @@ components: - grpcMetadata - grpcProto - connection + - javascript example: statusCode type: string x-enum-varnames: @@ -14043,6 +14058,7 @@ components: - GRPC_METADATA - GRPC_PROTO - CONNECTION + - JAVASCRIPT SyntheticsAssertionXPathOperator: description: Assertion operator to apply. enum: diff --git a/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.frozen b/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.frozen index 731c5145c9bb..a375d33a12a9 100644 --- a/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.frozen +++ b/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.frozen @@ -1 +1 @@ -2024-06-14T15:19:35.860Z \ No newline at end of file +2024-08-06T12:03:16.833Z \ No newline at end of file diff --git a/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.yml b/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.yml index 3cc4c4c52781..94663e0af0eb 100644 --- a/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.yml +++ b/cassettes/features/v1/monitors/Get-a-synthetics-monitor-s-details.yml @@ -1,11 +1,12 @@ http_interactions: -- recorded_at: Fri, 14 Jun 2024 15:19:35 GMT +- recorded_at: Tue, 06 Aug 2024 12:03:16 GMT request: body: encoding: UTF-8 string: '{"config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testgetasyntheticsmonitorsdetails1718378375"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Get_a_synthetics_monitor_s_details-1718378375","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Get_a_synthetics_monitor_s_details-1718378375","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testgetasyntheticsmonitorsdetails1722945796"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Get_a_synthetics_monitor_s_details-1722945796","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Get_a_synthetics_monitor_s_details-1722945796","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -16,29 +17,30 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"public_id":"8xz-6uh-7qb","name":"Test-Get_a_synthetics_monitor_s_details-1718378375","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T15:19:36.457734+00:00","modified_at":"2024-06-14T15:19:36.457734+00:00","config":{"assertions":[{"operator":"is","property":"{{ + string: '{"public_id":"4c7-n7j-xbv","name":"Test-Get_a_synthetics_monitor_s_details-1722945796","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-06T12:03:17.509325+00:00","modified_at":"2024-08-06T12:03:17.509325+00:00","config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testgetasyntheticsmonitorsdetails1718378375"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Get_a_synthetics_monitor_s_details-1718378375","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147128145,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testgetasyntheticsmonitorsdetails1722945796"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Get_a_synthetics_monitor_s_details-1722945796","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150677868,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:19:35 GMT +- recorded_at: Tue, 06 Aug 2024 12:03:16 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v1/monitor/147128145 + uri: https://api.datadoghq.com/api/v1/monitor/150677868 response: body: encoding: UTF-8 - string: '{"id":147128145,"org_id":321813,"type":"synthetics alert","name":"Test-Get_a_synthetics_monitor_s_details-1718378375","message":"BDD - test payload: synthetics_api_http_test_payload.json","tags":["testing:api","probe_dc:aws:us-east-2","check_type:api","check_status:live","ci_execution_rule:blocking"],"query":"no_query","options":{"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true,"synthetics_check_id":"8xz-6uh-7qb","silenced":{}},"multi":false,"created_at":1718378376000,"created":"2024-06-14T15:19:36.431746+00:00","modified":"2024-06-14T15:19:36.431746+00:00","deleted":null,"restricted_roles":null,"priority":5,"overall_state_modified":null,"overall_state":"No + string: '{"id":150677868,"org_id":321813,"type":"synthetics alert","name":"Test-Get_a_synthetics_monitor_s_details-1722945796","message":"BDD + test payload: synthetics_api_http_test_payload.json","tags":["testing:api","probe_dc:aws:us-east-2","check_type:api","check_status:live","ci_execution_rule:blocking"],"query":"no_query","options":{"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true,"synthetics_check_id":"4c7-n7j-xbv","silenced":{}},"multi":false,"created_at":1722945797000,"created":"2024-08-06T12:03:17.451148+00:00","modified":"2024-08-06T12:03:17.451148+00:00","deleted":null,"restricted_roles":null,"priority":5,"overall_state_modified":null,"overall_state":"No Data","creator":{"name":null,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","id":1445416}} ' @@ -48,11 +50,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:19:35 GMT +- recorded_at: Tue, 06 Aug 2024 12:03:16 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["8xz-6uh-7qb"]}' + string: '{"public_ids":["4c7-n7j-xbv"]}' headers: Accept: - application/json @@ -63,7 +65,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"public_id":"8xz-6uh-7qb","deleted_at":"2024-06-14T15:19:38.234242+00:00"}]} + string: '{"deleted_tests":[{"public_id":"4c7-n7j-xbv","deleted_at":"2024-08-06T12:03:18.946796+00:00"}]} ' headers: diff --git a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.frozen b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.frozen index cbbd739ef94a..e9272dcbf7cf 100644 --- a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.frozen +++ b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.frozen @@ -1 +1 @@ -2024-06-14T14:40:25.126Z \ No newline at end of file +2024-08-05T15:40:27.317Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.yml b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.yml index a9d5dfbe0a4e..35a125520bce 100644 --- a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.yml +++ b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-has-bodyHash-filled-out.yml @@ -1,11 +1,12 @@ http_interactions: -- recorded_at: Fri, 14 Jun 2024 14:40:25 GMT +- recorded_at: Mon, 05 Aug 2024 15:40:27 GMT request: body: encoding: UTF-8 string: '{"config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptesthasbodyhashfilledout1718376025"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1718376025","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1718376025","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptesthasbodyhashfilledout1722872427"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1722872427","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1722872427","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -16,21 +17,22 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"public_id":"xtt-2y8-fcx","name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1718376025","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T14:40:25.693877+00:00","modified_at":"2024-06-14T14:40:25.693877+00:00","config":{"assertions":[{"operator":"is","property":"{{ + string: '{"public_id":"rnn-mpb-3w9","name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1722872427","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-05T15:40:27.974869+00:00","modified_at":"2024-08-05T15:40:27.974869+00:00","config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptesthasbodyhashfilledout1718376025"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1718376025","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147123918,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptesthasbodyhashfilledout1722872427"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_has_bodyHash_filled_out-1722872427","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150596447,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 14:40:25 GMT +- recorded_at: Mon, 05 Aug 2024 15:40:27 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["xtt-2y8-fcx"]}' + string: '{"public_ids":["rnn-mpb-3w9"]}' headers: Accept: - application/json @@ -41,7 +43,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"public_id":"xtt-2y8-fcx","deleted_at":"2024-06-14T14:40:26.443538+00:00"}]} + string: '{"deleted_tests":[{"public_id":"rnn-mpb-3w9","deleted_at":"2024-08-05T15:40:28.861853+00:00"}]} ' headers: diff --git a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.frozen b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.frozen index bf0c13ee9493..3bd4c5231076 100644 --- a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.frozen +++ b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.frozen @@ -1 +1 @@ -2024-06-14T13:54:40.785Z \ No newline at end of file +2024-08-05T15:40:13.862Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.yml b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.yml index 5a588c60f616..d825a9b3d07c 100644 --- a/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.yml +++ b/cassettes/features/v1/synthetics/Create-an-API-HTTP-test-returns-OK-Returns-the-created-test-details-response.yml @@ -1,11 +1,12 @@ http_interactions: -- recorded_at: Fri, 14 Jun 2024 13:54:40 GMT +- recorded_at: Mon, 05 Aug 2024 15:40:13 GMT request: body: encoding: UTF-8 string: '{"config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1718373280"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1718373280","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1718373280","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1722872413"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1722872413","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1722872413","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -16,21 +17,22 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"public_id":"yii-sbp-va9","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1718373280","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T13:54:41.406061+00:00","modified_at":"2024-06-14T13:54:41.406061+00:00","config":{"assertions":[{"operator":"is","property":"{{ + string: '{"public_id":"8wt-aya-663","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1722872413","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-05T15:40:14.528146+00:00","modified_at":"2024-08-05T15:40:14.528146+00:00","config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1718373280"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1718373280","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147119987,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1722872413"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1722872413","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150596415,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 13:54:40 GMT +- recorded_at: Mon, 05 Aug 2024 15:40:13 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["yii-sbp-va9"]}' + string: '{"public_ids":["8wt-aya-663"]}' headers: Accept: - application/json @@ -41,7 +43,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"public_id":"yii-sbp-va9","deleted_at":"2024-06-14T13:54:42.878475+00:00"}]} + string: '{"deleted_tests":[{"public_id":"8wt-aya-663","deleted_at":"2024-08-05T15:40:15.441085+00:00"}]} ' headers: diff --git a/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.frozen index f012842d6abd..634b6c41f5af 100644 --- a/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.frozen +++ b/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.frozen @@ -1 +1 @@ -2024-06-14T15:20:34.634Z \ No newline at end of file +2024-08-06T12:04:08.273Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.yml b/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.yml index 4d503298978b..68bdb62ee7c3 100644 --- a/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.yml +++ b/cassettes/features/v1/synthetics/Edit-an-API-test-returns-OK-response.yml @@ -1,11 +1,12 @@ http_interactions: -- recorded_at: Fri, 14 Jun 2024 15:20:34 GMT +- recorded_at: Tue, 06 Aug 2024 12:04:08 GMT request: body: encoding: UTF-8 string: '{"config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1718378434"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1718378434","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1718378434","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1722945848"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1722945848","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1722945848","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -16,48 +17,49 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"public_id":"trj-yx7-u72","name":"Test-Edit_an_API_test_returns_OK_response-1718378434","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T15:20:35.233519+00:00","modified_at":"2024-06-14T15:20:35.233519+00:00","config":{"assertions":[{"operator":"is","property":"{{ + string: '{"public_id":"id6-nrj-7e6","name":"Test-Edit_an_API_test_returns_OK_response-1722945848","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-06T12:04:08.988907+00:00","modified_at":"2024-08-06T12:04:08.988907+00:00","config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1718378434"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1718378434","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147128243,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1722945848"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1722945848","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150677881,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:20:34 GMT +- recorded_at: Tue, 06 Aug 2024 12:04:08 GMT request: body: encoding: UTF-8 string: '{"config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1718378434"},"method":"GET","timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1718378434-updated","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-TestSyntheticsAPITestLifecycle-1623076664","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"status":"live","subtype":"http","tags":["testing:api"],"type":"api"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1722945848"},"method":"GET","timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1722945848-updated","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-TestSyntheticsAPITestLifecycle-1623076664","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"status":"live","subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v1/synthetics/tests/api/trj-yx7-u72 + uri: https://api.datadoghq.com/api/v1/synthetics/tests/api/id6-nrj-7e6 response: body: encoding: UTF-8 - string: '{"public_id":"trj-yx7-u72","name":"Test-Edit_an_API_test_returns_OK_response-1718378434-updated","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T15:20:35.233519+00:00","modified_at":"2024-06-14T15:20:36.567938+00:00","config":{"assertions":[{"operator":"is","property":"{{ + string: '{"public_id":"id6-nrj-7e6","name":"Test-Edit_an_API_test_returns_OK_response-1722945848-updated","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-06T12:04:08.988907+00:00","modified_at":"2024-08-06T12:04:10.449074+00:00","config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"certificate":{"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1718378434"},"method":"GET","timeout":10,"url":"https://datadoghq.com"}},"message":"BDD - test payload: synthetics_api_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-TestSyntheticsAPITestLifecycle-1623076664","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147128243,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"overall_state":2,"overall_state_modified":"2024-06-14T15:20:36.622813+00:00"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"certificate":{"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1722945848"},"method":"GET","timeout":10,"url":"https://datadoghq.com"}},"message":"BDD + test payload: synthetics_api_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-TestSyntheticsAPITestLifecycle-1623076664","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150677881,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"overall_state":2,"overall_state_modified":"2024-08-06T12:04:10.507109+00:00"}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:20:34 GMT +- recorded_at: Tue, 06 Aug 2024 12:04:08 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["trj-yx7-u72"]}' + string: '{"public_ids":["id6-nrj-7e6"]}' headers: Accept: - application/json @@ -68,7 +70,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"public_id":"trj-yx7-u72","deleted_at":"2024-06-14T15:20:37.970715+00:00"}]} + string: '{"deleted_tests":[{"public_id":"id6-nrj-7e6","deleted_at":"2024-08-06T12:04:11.994871+00:00"}]} ' headers: diff --git a/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.frozen index fc3d0f97df8c..877f06441e32 100644 --- a/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.frozen +++ b/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.frozen @@ -1 +1 @@ -2024-06-14T15:20:59.099Z \ No newline at end of file +2024-08-06T12:04:27.724Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.yml b/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.yml index 02ee88de3e33..6a0afa17b959 100644 --- a/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.yml +++ b/cassettes/features/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.yml @@ -1,11 +1,12 @@ http_interactions: -- recorded_at: Fri, 14 Jun 2024 15:20:59 GMT +- recorded_at: Tue, 06 Aug 2024 12:04:27 GMT request: body: encoding: UTF-8 string: '{"config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testpatchasynthetictestreturnsokresponse1718378459"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Patch_a_Synthetic_test_returns_OK_response-1718378459","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Patch_a_Synthetic_test_returns_OK_response-1718378459","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testpatchasynthetictestreturnsokresponse1722945867"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Patch_a_Synthetic_test_returns_OK_response-1722945867","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Patch_a_Synthetic_test_returns_OK_response-1722945867","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -16,17 +17,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"public_id":"tmq-dz3-gvf","name":"Test-Patch_a_Synthetic_test_returns_OK_response-1718378459","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T15:20:59.669335+00:00","modified_at":"2024-06-14T15:20:59.669335+00:00","config":{"assertions":[{"operator":"is","property":"{{ + string: '{"public_id":"jvr-sxa-dek","name":"Test-Patch_a_Synthetic_test_returns_OK_response-1722945867","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-06T12:04:28.349748+00:00","modified_at":"2024-08-06T12:04:28.349748+00:00","config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testpatchasynthetictestreturnsokresponse1718378459"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Patch_a_Synthetic_test_returns_OK_response-1718378459","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147128248,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testpatchasynthetictestreturnsokresponse1722945867"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Patch_a_Synthetic_test_returns_OK_response-1722945867","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150677883,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:20:59 GMT +- recorded_at: Tue, 06 Aug 2024 12:04:27 GMT request: body: encoding: UTF-8 @@ -37,24 +39,25 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v1/synthetics/tests/tmq-dz3-gvf + uri: https://api.datadoghq.com/api/v1/synthetics/tests/jvr-sxa-dek response: body: encoding: UTF-8 - string: '{"public_id":"tmq-dz3-gvf","name":"New test name","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T15:20:59.669335+00:00","modified_at":"2024-06-14T15:21:00.614278+00:00","config":{"assertions":[{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testpatchasynthetictestreturnsokresponse1718378459"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Patch_a_Synthetic_test_returns_OK_response-1718378459","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147128248,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + string: '{"public_id":"jvr-sxa-dek","name":"New test name","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-06T12:04:28.349748+00:00","modified_at":"2024-08-06T12:04:29.397485+00:00","config":{"assertions":[{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testpatchasynthetictestreturnsokresponse1722945867"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Patch_a_Synthetic_test_returns_OK_response-1722945867","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150677883,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:20:59 GMT +- recorded_at: Tue, 06 Aug 2024 12:04:27 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["tmq-dz3-gvf"]}' + string: '{"public_ids":["jvr-sxa-dek"]}' headers: Accept: - application/json @@ -65,7 +68,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"public_id":"tmq-dz3-gvf","deleted_at":"2024-06-14T15:21:01.503647+00:00"}]} + string: '{"deleted_tests":[{"public_id":"jvr-sxa-dek","deleted_at":"2024-08-06T12:04:30.204129+00:00"}]} ' headers: diff --git a/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.frozen index 9eeec0a396af..ac270382ee27 100644 --- a/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.frozen +++ b/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.frozen @@ -1 +1 @@ -2024-06-14T15:21:17.809Z \ No newline at end of file +2024-08-06T12:05:32.428Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.yml b/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.yml index fafc305b70d9..4b3ff7514d7e 100644 --- a/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.yml +++ b/cassettes/features/v1/synthetics/Trigger-Synthetic-tests-returns-OK-response.yml @@ -1,11 +1,12 @@ http_interactions: -- recorded_at: Fri, 14 Jun 2024 15:21:17 GMT +- recorded_at: Tue, 06 Aug 2024 12:05:32 GMT request: body: encoding: UTF-8 string: '{"config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testtriggersynthetictestsreturnsokresponse1718378477"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Trigger_Synthetic_tests_returns_OK_response-1718378477","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Trigger_Synthetic_tests_returns_OK_response-1718378477","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"content":"cert-content","filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"content":"key-content","filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testtriggersynthetictestsreturnsokresponse1722945932"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_http_test_payload.json","name":"Test-Trigger_Synthetic_tests_returns_OK_response-1722945932","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Trigger_Synthetic_tests_returns_OK_response-1722945932","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -16,21 +17,22 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"public_id":"n2s-zgq-9t7","name":"Test-Trigger_Synthetic_tests_returns_OK_response-1718378477","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-14T15:21:18.387026+00:00","modified_at":"2024-06-14T15:21:18.387026+00:00","config":{"assertions":[{"operator":"is","property":"{{ + string: '{"public_id":"n8y-iq9-udp","name":"Test-Trigger_Synthetic_tests_returns_OK_response-1722945932","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-06T12:05:33.055418+00:00","modified_at":"2024-08-06T12:05:33.055418+00:00","config":{"assertions":[{"operator":"is","property":"{{ PROPERTY }}","target":"text/html","type":"header"},{"operator":"lessThan","target":2000,"timingsScope":"withoutDNS","type":"responseTime"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"elementsOperator":"atLeastOneElementMatches","jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": - \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testtriggersynthetictestsreturnsokresponse1718378477"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", - \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Trigger_Synthetic_tests_returns_OK_response-1718378477","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147128256,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"},{"operator":"md5","target":"a","type":"bodyHash"},{"code":"const + hello = ''world'';","type":"javascript"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testtriggersynthetictestsreturnsokresponse1722945932"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"},"variablesFromScript":"dd.variable.set(\"FOO\", + \"foo\")"},"message":"BDD test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Trigger_Synthetic_tests_returns_OK_response-1722945932","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150677915,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:21:17 GMT +- recorded_at: Tue, 06 Aug 2024 12:05:32 GMT request: body: encoding: UTF-8 - string: '{"tests":[{"public_id":"n2s-zgq-9t7"}]}' + string: '{"tests":[{"public_id":"n8y-iq9-udp"}]}' headers: Accept: - application/json @@ -41,7 +43,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"triggered_check_ids":["n2s-zgq-9t7"],"results":[{"public_id":"n2s-zgq-9t7","location":30005,"result_id":"3631876514496720429"}],"locations":[{"id":30005,"name":"aws:us-east-2","display_name":"Ohio + string: '{"triggered_check_ids":["n8y-iq9-udp"],"results":[{"public_id":"n8y-iq9-udp","location":30005,"result_id":"1085660093638008455"}],"locations":[{"id":30005,"name":"aws:us-east-2","display_name":"Ohio (AWS)","region":"Americas","is_active":true,"is_public":true,"metadata":null}],"batch_id":null} ' @@ -51,11 +53,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 14 Jun 2024 15:21:17 GMT +- recorded_at: Tue, 06 Aug 2024 12:05:32 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["n2s-zgq-9t7"]}' + string: '{"public_ids":["n8y-iq9-udp"]}' headers: Accept: - application/json @@ -66,7 +68,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"public_id":"n2s-zgq-9t7","deleted_at":"2024-06-14T15:21:20.295374+00:00"}]} + string: '{"deleted_tests":[{"public_id":"n8y-iq9-udp","deleted_at":"2024-08-06T12:05:35.339864+00:00"}]} ' headers: diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb index 59f9f7c3b046..ac9bfc48cac1 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb @@ -59,6 +59,10 @@ target: "a", type: DatadogAPIClient::V1::SyntheticsAssertionBodyHashType::BODY_HASH, }), + DatadogAPIClient::V1::SyntheticsAssertionJavascript.new({ + code: "const hello = 'world';", + type: DatadogAPIClient::V1::SyntheticsAssertionType::JAVASCRIPT, + }), ], config_variables: [ DatadogAPIClient::V1::SyntheticsConfigVariable.new({ diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.rb b/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.rb index 667dfb31caad..8fbc6761d803 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.rb +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.rb @@ -59,6 +59,10 @@ target: "a", type: DatadogAPIClient::V1::SyntheticsAssertionBodyHashType::BODY_HASH, }), + DatadogAPIClient::V1::SyntheticsAssertionJavascript.new({ + code: "const hello = 'world';", + type: DatadogAPIClient::V1::SyntheticsAssertionType::JAVASCRIPT, + }), ], config_variables: [ DatadogAPIClient::V1::SyntheticsConfigVariable.new({ diff --git a/features/v1/given.json b/features/v1/given.json index 3338b856b0f2..6e6648042b6d 100644 --- a/features/v1/given.json +++ b/features/v1/given.json @@ -238,7 +238,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n { \"operator\": \"lessThan\", \"target\": 2000, \"type\": \"responseTime\", \"timingsScope\": \"withoutDNS\" },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"elementsOperator\": \"atLeastOneElementMatches\",\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONSchema\",\n \"target\": {\n \"metaSchema\": \"draft-07\",\n \"jsonSchema\": \"{\\\"type\\\": \\\"object\\\", \\\"properties\\\":{\\\"slideshow\\\":{\\\"type\\\":\\\"object\\\"}}}\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"md5\",\n \"target\": \"a\",\n \"type\": \"bodyHash\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"variablesFromScript\": \"dd.variable.set(\\\"FOO\\\", \\\"foo\\\")\",\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n },\n \"persistCookies\": true\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" + "value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n {\n \"operator\": \"lessThan\",\n \"target\": 2000,\n \"type\": \"responseTime\",\n \"timingsScope\": \"withoutDNS\"\n },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"elementsOperator\": \"atLeastOneElementMatches\",\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONSchema\",\n \"target\": {\n \"metaSchema\": \"draft-07\",\n \"jsonSchema\": \"{\\\"type\\\": \\\"object\\\", \\\"properties\\\":{\\\"slideshow\\\":{\\\"type\\\":\\\"object\\\"}}}\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"md5\",\n \"target\": \"a\",\n \"type\": \"bodyHash\"\n },\n {\n \"code\": \"const hello = 'world';\",\n \"type\": \"javascript\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"variablesFromScript\": \"dd.variable.set(\\\"FOO\\\", \\\"foo\\\")\",\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n },\n \"persistCookies\": true\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" } ], "step": "there is a valid \"synthetics_api_test\" in the system", diff --git a/features/v1/synthetics_api_http_test_payload.json b/features/v1/synthetics_api_http_test_payload.json index 00627e7b7ad8..4124db016375 100644 --- a/features/v1/synthetics_api_http_test_payload.json +++ b/features/v1/synthetics_api_http_test_payload.json @@ -7,7 +7,12 @@ "target": "text/html", "type": "header" }, - { "operator": "lessThan", "target": 2000, "type": "responseTime", "timingsScope": "withoutDNS" }, + { + "operator": "lessThan", + "target": 2000, + "type": "responseTime", + "timingsScope": "withoutDNS" + }, { "operator": "validatesJSONPath", "target": { @@ -48,6 +53,10 @@ "operator": "md5", "target": "a", "type": "bodyHash" + }, + { + "code": "const hello = 'world';", + "type": "javascript" } ], "configVariables": [ diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index cfbeaf5b3c4f..0f1dab0e8936 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -555,6 +555,7 @@ def overrides "v1.synthetics_assertion_body_hash_operator" => "SyntheticsAssertionBodyHashOperator", "v1.synthetics_assertion_body_hash_target" => "SyntheticsAssertionBodyHashTarget", "v1.synthetics_assertion_body_hash_type" => "SyntheticsAssertionBodyHashType", + "v1.synthetics_assertion_javascript" => "SyntheticsAssertionJavascript", "v1.synthetics_assertion_json_path_operator" => "SyntheticsAssertionJSONPathOperator", "v1.synthetics_assertion_json_path_target" => "SyntheticsAssertionJSONPathTarget", "v1.synthetics_assertion_json_path_target_target" => "SyntheticsAssertionJSONPathTargetTarget", diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion.rb b/lib/datadog_api_client/v1/models/synthetics_assertion.rb index 1c93ee00e25a..02ed90850bde 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion.rb @@ -31,7 +31,8 @@ def openapi_one_of :'SyntheticsAssertionBodyHashTarget', :'SyntheticsAssertionJSONPathTarget', :'SyntheticsAssertionJSONSchemaTarget', - :'SyntheticsAssertionXPathTarget' + :'SyntheticsAssertionXPathTarget', + :'SyntheticsAssertionJavascript' ] end # Builds the object diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_javascript.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_javascript.rb new file mode 100644 index 000000000000..55c2d07b3890 --- /dev/null +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_javascript.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # A JavaScript assertion. + class SyntheticsAssertionJavascript + include BaseGenericModel + + # The JavaScript code that performs the assertions. + attr_reader :code + + # Type of the assertion. + attr_reader :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'code' => :'code', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'code' => :'String', + :'type' => :'SyntheticsAssertionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionJavascript` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionJavascript`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @code.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param code [Object] Object to be assigned + # @!visibility private + def code=(code) + if code.nil? + fail ArgumentError, 'invalid value for "code", code cannot be nil.' + end + @code = code + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + type == o.type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [code, type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb b/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb index 319f12508df6..dec4c72aeecb 100644 --- a/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb +++ b/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb @@ -40,5 +40,6 @@ class SyntheticsAssertionType GRPC_METADATA = "grpcMetadata".freeze GRPC_PROTO = "grpcProto".freeze CONNECTION = "connection".freeze + JAVASCRIPT = "javascript".freeze end end