From c069c1c66bff4511f120cc0021d85ddc7c7e5701 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 11 Jan 2023 22:36:51 +0000 Subject: [PATCH] Regenerate client from commit 817239f2 of spec repo --- .apigentools-info | 8 ++--- .generator/schemas/v1/openapi.yaml | 13 ++++++++ .../Get-a-synthetics-monitor-s-details.frozen | 2 +- .../Get-a-synthetics-monitor-s-details.yml | 28 ++++++++--------- ...s-the-created-test-details-response.frozen | 2 +- ...urns-the-created-test-details-response.yml | 18 +++++------ ...dit-an-API-test-returns-OK-response.frozen | 2 +- .../Edit-an-API-test-returns-OK-response.yml | 30 +++++++++---------- ...ynthetics-tests-returns-OK-response.frozen | 2 +- ...r-Synthetics-tests-returns-OK-response.yml | 24 +++++++-------- .../v1/synthetics/CreateSyntheticsAPITest.rb | 1 + .../CreateSyntheticsAPITest_1487281163.rb | 1 + examples/v1/synthetics/UpdateBrowserTest.rb | 1 + features/v1/given.json | 2 +- features/v1/synthetics.feature | 21 ++++++------- .../v1/synthetics_api_http_test_payload.json | 3 +- lib/datadog_api_client/inflector.rb | 1 + .../v1/models/synthetics_test_options.rb | 12 +++++++- .../synthetics_test_options_http_version.rb | 28 +++++++++++++++++ 19 files changed, 128 insertions(+), 71 deletions(-) create mode 100644 lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb diff --git a/.apigentools-info b/.apigentools-info index 2aabf24649e5..aed198042f8f 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-01-11 12:48:09.134631", - "spec_repo_commit": "c986b09e" + "regenerated": "2023-01-11 22:36:32.438898", + "spec_repo_commit": "817239f2" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-01-11 12:48:09.150441", - "spec_repo_commit": "c986b09e" + "regenerated": "2023-01-11 22:36:32.450858", + "spec_repo_commit": "817239f2" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 6f17f20182f2..effca083ac2a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -13449,6 +13449,8 @@ components: follow_redirects: description: For API HTTP test, whether or not the test should follow redirects. type: boolean + httpVersion: + $ref: '#/components/schemas/SyntheticsTestOptionsHTTPVersion' ignoreServerCertificateError: description: Ignore server certificate error for browser tests. type: boolean @@ -13495,6 +13497,17 @@ components: minimum: 30 type: integer type: object + SyntheticsTestOptionsHTTPVersion: + description: HTTP version to use for a Synthetic test. + enum: + - http1 + - http2 + - any + type: string + x-enum-varnames: + - HTTP1 + - HTTP2 + - HTTP2_FALLBACK_TO_HTTP1 SyntheticsTestOptionsMonitorOptions: description: 'Object containing the options for a Synthetic test as a monitor 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 99b9bcc12840..47cccbf36a39 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 @@ -2022-11-21T13:20:41.192Z \ No newline at end of file +2023-01-11T22:27:09.960Z \ 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 9f07d2184889..608584a849bc 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,10 +1,10 @@ http_interactions: -- recorded_at: Mon, 21 Nov 2022 13:20:41 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:09 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testgetasyntheticsmonitorsdetails1669036841"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_http_test_payload.json","name":"Test-Get_a_synthetics_monitor_s_details-1669036841","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Get_a_synthetics_monitor_s_details-1669036841","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testgetasyntheticsmonitorsdetails1673476029"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_http_test_payload.json","name":"Test-Get_a_synthetics_monitor_s_details-1673476029","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-1673476029","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -15,29 +15,29 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"status":"live","public_id":"ahw-qah-d9b","tags":["testing:api"],"org_id":569509,"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Get_a_synthetics_monitor_s_details-1669036841","monitor_id":103654710,"type":"api","created_at":"2022-11-21T13:20:41.629289+00:00","modified_at":"2022-11-21T13:20:41.629289+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testgetasyntheticsmonitorsdetails1669036841"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ - PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Get_a_synthetics_monitor_s_details-1669036841","tick_every":60}}' + string: '{"status":"live","public_id":"bij-9tv-kg3","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Get_a_synthetics_monitor_s_details-1673476029","monitor_id":107572460,"type":"api","created_at":"2023-01-11T22:27:10.318316+00:00","modified_at":"2023-01-11T22:27:10.318316+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testgetasyntheticsmonitorsdetails1673476029"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ + PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Get_a_synthetics_monitor_s_details-1673476029","tick_every":60,"httpVersion":"http2"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Mon, 21 Nov 2022 13:20:41 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:09 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v1/monitor/103654710 + uri: https://api.datadoghq.com/api/v1/monitor/107572460 response: body: encoding: UTF-8 - string: '{"id":103654710,"org_id":569509,"type":"synthetics alert","name":"Test-Get_a_synthetics_monitor_s_details-1669036841","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":{"include_tags":true,"notify_audit":false,"new_host_delay":300,"on_missing_data":"show_no_data","synthetics_check_id":"ahw-qah-d9b","silenced":{}},"multi":false,"created_at":1669036841000,"created":"2022-11-21T13:20:41.610325+00:00","modified":"2022-11-21T13:20:41.610325+00:00","deleted":null,"restricted_roles":null,"priority":5,"overall_state_modified":null,"overall_state":"No - Data","creator":{"name":"Frog","handle":"frog@datadoghq.com","email":"frog@datadoghq.com","id":2781302}} + string: '{"id":107572460,"org_id":321813,"type":"synthetics alert","name":"Test-Get_a_synthetics_monitor_s_details-1673476029","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":{"include_tags":true,"notify_audit":false,"new_host_delay":300,"on_missing_data":"show_no_data","synthetics_check_id":"bij-9tv-kg3","silenced":{}},"multi":false,"created_at":1673476030000,"created":"2023-01-11T22:27:10.299804+00:00","modified":"2023-01-11T22:27:10.299804+00:00","deleted":null,"restricted_roles":null,"priority":5,"overall_state_modified":null,"overall_state":"No + Data","creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com","id":1445416}} ' headers: @@ -46,11 +46,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Nov 2022 13:20:41 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:09 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["ahw-qah-d9b"]}' + string: '{"public_ids":["bij-9tv-kg3"]}' headers: Accept: - application/json @@ -61,7 +61,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"deleted_at":"2022-11-21T13:20:42.443854+00:00","public_id":"ahw-qah-d9b"}]} + string: '{"deleted_tests":[{"deleted_at":"2023-01-11T22:27:10.992952+00:00","public_id":"bij-9tv-kg3"}]} ' 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 74cf27df6770..d27a94e62486 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 @@ -2022-11-14T14:48:36.716Z \ No newline at end of file +2023-01-11T22:23:00.967Z \ 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 895e8ddd8012..5a4e30b66aae 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,10 +1,10 @@ http_interactions: -- recorded_at: Mon, 14 Nov 2022 14:48:36 GMT +- recorded_at: Wed, 11 Jan 2023 22:23:00 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1668437316"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1668437316","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1668437316","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1673475780"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1673475780","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-1673475780","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -15,20 +15,20 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"status":"live","public_id":"5uy-n93-2fv","tags":["testing:api"],"org_id":569509,"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1668437316","monitor_id":102936713,"type":"api","created_at":"2022-11-14T14:48:37.216855+00:00","modified_at":"2022-11-14T14:48:37.216855+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1668437316"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ - PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1668437316","tick_every":60}}' + string: '{"status":"live","public_id":"v95-t96-e52","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780","monitor_id":107572226,"type":"api","created_at":"2023-01-11T22:23:01.221860+00:00","modified_at":"2023-01-11T22:23:01.221860+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1673475780"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ + PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780","tick_every":60,"httpVersion":"http2"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Mon, 14 Nov 2022 14:48:36 GMT +- recorded_at: Wed, 11 Jan 2023 22:23:00 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["5uy-n93-2fv"]}' + string: '{"public_ids":["v95-t96-e52"]}' headers: Accept: - application/json @@ -39,7 +39,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"deleted_at":"2022-11-14T14:48:37.728729+00:00","public_id":"5uy-n93-2fv"}]} + string: '{"deleted_tests":[{"deleted_at":"2023-01-11T22:23:01.652785+00:00","public_id":"v95-t96-e52"}]} ' 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 0f2dab9e3b03..fa2ad4b7082b 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 @@ -2022-11-21T13:20:13.404Z \ No newline at end of file +2023-01-11T22:27:11.207Z \ 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 6c65dd8b1422..c2abc9bad3a1 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,10 +1,10 @@ http_interactions: -- recorded_at: Mon, 21 Nov 2022 13:20:13 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:11 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testeditanapitestreturnsokresponse1669036813"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_http_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1669036813","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1669036813","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testeditanapitestreturnsokresponse1673476031"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_http_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1673476031","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-1673476031","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -15,33 +15,33 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"status":"live","public_id":"h4w-m2z-qki","tags":["testing:api"],"org_id":569509,"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Edit_an_API_test_returns_OK_response-1669036813","monitor_id":103654681,"type":"api","created_at":"2022-11-21T13:20:13.821196+00:00","modified_at":"2022-11-21T13:20:13.821196+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testeditanapitestreturnsokresponse1669036813"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ - PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1669036813","tick_every":60}}' + string: '{"status":"live","public_id":"e9j-ihg-ib3","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Edit_an_API_test_returns_OK_response-1673476031","monitor_id":107572463,"type":"api","created_at":"2023-01-11T22:27:11.422320+00:00","modified_at":"2023-01-11T22:27:11.422320+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testeditanapitestreturnsokresponse1673476031"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ + PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1673476031","tick_every":60,"httpVersion":"http2"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Mon, 21 Nov 2022 13:20:13 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:11 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"}],"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":"testeditanapitestreturnsokresponse1669036813"},"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-1669036813-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"}' + 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"}],"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":"testeditanapitestreturnsokresponse1673476031"},"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-1673476031-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/h4w-m2z-qki + uri: https://api.datadoghq.com/api/v1/synthetics/tests/api/e9j-ihg-ib3 response: body: encoding: UTF-8 - string: '{"status":"live","public_id":"h4w-m2z-qki","tags":["testing:api"],"org_id":569509,"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_test_payload.json","deleted_at":null,"name":"Test-Edit_an_API_test_returns_OK_response-1669036813-updated","monitor_id":103654681,"type":"api","created_at":"2022-11-21T13:20:13.821196+00:00","modified_at":"2022-11-21T13:20:14.364092+00:00","subtype":"http","config":{"request":{"url":"https://datadoghq.com","headers":{"unique":"testeditanapitestreturnsokresponse1669036813"},"certificate":{"cert":{"updatedAt":"2020-10-16T09:23:24.857Z","filename":"cert-filename"},"key":{"updatedAt":"2020-10-16T09:23:24.857Z","filename":"key-filename"}},"method":"GET","timeout":10},"assertions":[{"operator":"is","property":"{{ + string: '{"status":"live","public_id":"e9j-ihg-ib3","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_test_payload.json","deleted_at":null,"name":"Test-Edit_an_API_test_returns_OK_response-1673476031-updated","monitor_id":107572463,"type":"api","created_at":"2023-01-11T22:27:11.422320+00:00","modified_at":"2023-01-11T22:27:11.678286+00:00","subtype":"http","config":{"request":{"url":"https://datadoghq.com","headers":{"unique":"testeditanapitestreturnsokresponse1673476031"},"certificate":{"cert":{"updatedAt":"2020-10-16T09:23:24.857Z","filename":"cert-filename"},"key":{"updatedAt":"2020-10-16T09:23:24.857Z","filename":"key-filename"}},"method":"GET","timeout":10},"assertions":[{"operator":"is","property":"{{ PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-TestSyntheticsAPITestLifecycle-1623076664","tick_every":60}}' headers: Content-Type: @@ -49,11 +49,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Nov 2022 13:20:13 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:11 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["h4w-m2z-qki"]}' + string: '{"public_ids":["e9j-ihg-ib3"]}' headers: Accept: - application/json @@ -64,7 +64,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"deleted_at":"2022-11-21T13:20:14.933925+00:00","public_id":"h4w-m2z-qki"}]} + string: '{"deleted_tests":[{"deleted_at":"2023-01-11T22:27:11.896795+00:00","public_id":"e9j-ihg-ib3"}]} ' headers: diff --git a/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.frozen index af5f262e51e7..8b5746319ffd 100644 --- a/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.frozen +++ b/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.frozen @@ -1 +1 @@ -2022-11-21T13:20:15.030Z \ No newline at end of file +2023-01-11T22:27:12.022Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.yml b/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.yml index 06e3bd73e015..b09f0bef820a 100644 --- a/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.yml +++ b/cassettes/features/v1/synthetics/Trigger-Synthetics-tests-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Mon, 21 Nov 2022 13:20:15 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:12 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testtriggersyntheticstestsreturnsokresponse1669036815"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_http_test_payload.json","name":"Test-Trigger_Synthetics_tests_returns_OK_response-1669036815","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Trigger_Synthetics_tests_returns_OK_response-1669036815","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + 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":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"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":"testtriggersyntheticstestsreturnsokresponse1673476032"},"method":"GET","proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_http_test_payload.json","name":"Test-Trigger_Synthetics_tests_returns_OK_response-1673476032","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_Synthetics_tests_returns_OK_response-1673476032","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -15,20 +15,20 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"status":"live","public_id":"j4a-q85-gdk","tags":["testing:api"],"org_id":569509,"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Trigger_Synthetics_tests_returns_OK_response-1669036815","monitor_id":103654682,"type":"api","created_at":"2022-11-21T13:20:15.485453+00:00","modified_at":"2022-11-21T13:20:15.485453+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testtriggersyntheticstestsreturnsokresponse1669036815"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ - PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Trigger_Synthetics_tests_returns_OK_response-1669036815","tick_every":60}}' + string: '{"status":"live","public_id":"rsj-jug-mjq","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Trigger_Synthetics_tests_returns_OK_response-1673476032","monitor_id":107572465,"type":"api","created_at":"2023-01-11T22:27:12.286447+00:00","modified_at":"2023-01-11T22:27:12.286447+00:00","subtype":"http","config":{"request":{"certificate":{"cert":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"url":"https://datadoghq.com","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testtriggersyntheticstestsreturnsokresponse1673476032"},"proxy":{"url":"https://datadoghq.com","headers":{}},"timeout":10,"method":"GET"},"assertions":[{"operator":"is","property":"{{ + PROPERTY }}","type":"header","target":"text/html"},{"operator":"lessThan","type":"responseTime","target":2000},{"operator":"validatesJSONPath","type":"body","target":{"operator":"isNot","targetValue":"0","jsonPath":"topKey"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"configVariables":[{"pattern":"content-type","type":"text","example":"content-type","name":"PROPERTY"}]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Trigger_Synthetics_tests_returns_OK_response-1673476032","tick_every":60,"httpVersion":"http2"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Mon, 21 Nov 2022 13:20:15 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:12 GMT request: body: encoding: UTF-8 - string: '{"tests":[{"public_id":"j4a-q85-gdk"}]}' + string: '{"tests":[{"public_id":"rsj-jug-mjq"}]}' headers: Accept: - application/json @@ -39,7 +39,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"batch_id":null,"results":[{"result_id":"412302685226144849","public_id":"j4a-q85-gdk","location":30005}],"triggered_check_ids":["j4a-q85-gdk"],"locations":[{"display_name":"Ohio + string: '{"batch_id":null,"results":[{"result_id":"8571118738293232737","public_id":"rsj-jug-mjq","location":30005}],"triggered_check_ids":["rsj-jug-mjq"],"locations":[{"display_name":"Ohio (AWS)","name":"aws:us-east-2","region":"Americas","is_active":true,"is_public":true,"id":30005,"metadata":null}]} ' @@ -49,11 +49,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Nov 2022 13:20:15 GMT +- recorded_at: Wed, 11 Jan 2023 22:27:12 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["j4a-q85-gdk"]}' + string: '{"public_ids":["rsj-jug-mjq"]}' headers: Accept: - application/json @@ -64,7 +64,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"deleted_at":"2022-11-21T13:20:16.308833+00:00","public_id":"j4a-q85-gdk"}]} + string: '{"deleted_tests":[{"deleted_at":"2023-01-11T22:27:12.624532+00:00","public_id":"rsj-jug-mjq"}]} ' headers: diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest.rb b/examples/v1/synthetics/CreateSyntheticsAPITest.rb index 61ce8f38d6df..0eb9c1d17a0a 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest.rb +++ b/examples/v1/synthetics/CreateSyntheticsAPITest.rb @@ -29,6 +29,7 @@ device_ids: [ DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE, ], + http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1, monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}), restricted_roles: [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb index 10e8abd9e453..57af1d847304 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb @@ -97,6 +97,7 @@ interval: 10, }), tick_every: 60, + http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP2, }), subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::HTTP, tags: [ diff --git a/examples/v1/synthetics/UpdateBrowserTest.rb b/examples/v1/synthetics/UpdateBrowserTest.rb index 17137947b522..def34a5f2dd3 100644 --- a/examples/v1/synthetics/UpdateBrowserTest.rb +++ b/examples/v1/synthetics/UpdateBrowserTest.rb @@ -51,6 +51,7 @@ device_ids: [ DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE, ], + http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1, monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}), restricted_roles: [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", diff --git a/features/v1/given.json b/features/v1/given.json index a1abe074eef7..83d99a16bc7a 100644 --- a/features/v1/given.json +++ b/features/v1/given.json @@ -147,7 +147,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\" },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\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 \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\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 }\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 },\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 { \"operator\": \"lessThan\", \"target\": 2000, \"type\": \"responseTime\" },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\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 \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\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 }\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.feature b/features/v1/synthetics.feature index f68f6e4f47b1..e76b3007d304 100644 --- a/features/v1/synthetics.feature +++ b/features/v1/synthetics.feature @@ -34,7 +34,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-app Scenario: Create a browser test returns "- JSON format is wrong" response Given new "CreateSyntheticsBrowserTest" request - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -60,7 +60,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-app Scenario: Create a browser test returns "Test quota is reached" response Given new "CreateSyntheticsBrowserTest" request - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 402 Test quota is reached @@ -124,6 +124,7 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK - Returns the created test details. And the response "name" is equal to "{{ unique }}" + And the response "options.httpVersion" is equal to "http2" @team:DataDog/synthetics-app Scenario: Create an API HTTP with oauth-rop test returns "OK - Returns the created test details." response @@ -144,21 +145,21 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-app Scenario: Create an API test returns "- JSON format is wrong" response Given new "CreateSyntheticsAPITest" request - And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} When the request is sent Then the response status is 400 - JSON format is wrong @generated @skip @team:DataDog/synthetics-app Scenario: Create an API test returns "OK - Returns the created test details." response Given new "CreateSyntheticsAPITest" request - And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} When the request is sent Then the response status is 200 OK - Returns the created test details. @generated @skip @team:DataDog/synthetics-app Scenario: Create an API test returns "Test quota is reached" response Given new "CreateSyntheticsAPITest" request - And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} When the request is sent Then the response status is 402 Test quota is reached @@ -250,7 +251,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "- JSON format is wrong" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -258,7 +259,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "- Synthetic Monitoring is not activated for the user" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 404 - Synthetic Monitoring is not activated for the user @@ -266,7 +267,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "OK" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 200 OK @@ -306,7 +307,7 @@ Feature: Synthetics Scenario: Edit an API test returns "- JSON format is wrong" response Given new "UpdateAPITest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -314,7 +315,7 @@ Feature: Synthetics Scenario: Edit an API test returns "- Synthetic Monitoring is not activated for the user" response Given new "UpdateAPITest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} When the request is sent Then the response status is 404 - Synthetic Monitoring is not activated for the user diff --git a/features/v1/synthetics_api_http_test_payload.json b/features/v1/synthetics_api_http_test_payload.json index 08743aad6a11..b752d0a5ac63 100644 --- a/features/v1/synthetics_api_http_test_payload.json +++ b/features/v1/synthetics_api_http_test_payload.json @@ -80,7 +80,8 @@ "monitor_name": "{{ unique }}", "monitor_priority": 5, "retry": { "count": 3, "interval": 10 }, - "tick_every": 60 + "tick_every": 60, + "httpVersion": "http2" }, "subtype": "http", "tags": ["testing:api"], diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8c5d2dd20398..e259c2c6b53d 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -571,6 +571,7 @@ def overrides "v1.synthetics_test_execution_rule" => "SyntheticsTestExecutionRule", "v1.synthetics_test_monitor_status" => "SyntheticsTestMonitorStatus", "v1.synthetics_test_options" => "SyntheticsTestOptions", + "v1.synthetics_test_options_http_version" => "SyntheticsTestOptionsHTTPVersion", "v1.synthetics_test_options_monitor_options" => "SyntheticsTestOptionsMonitorOptions", "v1.synthetics_test_options_retry" => "SyntheticsTestOptionsRetry", "v1.synthetics_test_pause_status" => "SyntheticsTestPauseStatus", diff --git a/lib/datadog_api_client/v1/models/synthetics_test_options.rb b/lib/datadog_api_client/v1/models/synthetics_test_options.rb index af35154b06c0..b584635c7fa2 100644 --- a/lib/datadog_api_client/v1/models/synthetics_test_options.rb +++ b/lib/datadog_api_client/v1/models/synthetics_test_options.rb @@ -50,6 +50,9 @@ class SyntheticsTestOptions # For API HTTP test, whether or not the test should follow redirects. attr_accessor :follow_redirects + # HTTP version to use for a Synthetic test. + attr_accessor :http_version + # Ignore server certificate error for browser tests. attr_accessor :ignore_server_certificate_error @@ -110,6 +113,7 @@ def self.attribute_map :'disable_cors' => :'disableCors', :'disable_csp' => :'disableCsp', :'follow_redirects' => :'follow_redirects', + :'http_version' => :'httpVersion', :'ignore_server_certificate_error' => :'ignoreServerCertificateError', :'initial_navigation_timeout' => :'initialNavigationTimeout', :'min_failure_duration' => :'min_failure_duration', @@ -137,6 +141,7 @@ def self.openapi_types :'disable_cors' => :'Boolean', :'disable_csp' => :'Boolean', :'follow_redirects' => :'Boolean', + :'http_version' => :'SyntheticsTestOptionsHTTPVersion', :'ignore_server_certificate_error' => :'Boolean', :'initial_navigation_timeout' => :'Integer', :'min_failure_duration' => :'Integer', @@ -202,6 +207,10 @@ def initialize(attributes = {}) self.follow_redirects = attributes[:'follow_redirects'] end + if attributes.key?(:'http_version') + self.http_version = attributes[:'http_version'] + end + if attributes.key?(:'ignore_server_certificate_error') self.ignore_server_certificate_error = attributes[:'ignore_server_certificate_error'] end @@ -304,6 +313,7 @@ def ==(o) disable_cors == o.disable_cors && disable_csp == o.disable_csp && follow_redirects == o.follow_redirects && + http_version == o.http_version && ignore_server_certificate_error == o.ignore_server_certificate_error && initial_navigation_timeout == o.initial_navigation_timeout && min_failure_duration == o.min_failure_duration && @@ -322,7 +332,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [accept_self_signed, allow_insecure, check_certificate_revocation, ci, device_ids, disable_cors, disable_csp, follow_redirects, ignore_server_certificate_error, initial_navigation_timeout, min_failure_duration, min_location_failed, monitor_name, monitor_options, monitor_priority, no_screenshot, restricted_roles, _retry, rum_settings, tick_every].hash + [accept_self_signed, allow_insecure, check_certificate_revocation, ci, device_ids, disable_cors, disable_csp, follow_redirects, http_version, ignore_server_certificate_error, initial_navigation_timeout, min_failure_duration, min_location_failed, monitor_name, monitor_options, monitor_priority, no_screenshot, restricted_roles, _retry, rum_settings, tick_every].hash end end end diff --git a/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb b/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb new file mode 100644 index 000000000000..195d30d52895 --- /dev/null +++ b/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb @@ -0,0 +1,28 @@ +=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 + # HTTP version to use for a Synthetic test. + class SyntheticsTestOptionsHTTPVersion + include BaseEnumModel + + HTTP1 = "http1".freeze + HTTP2 = "http2".freeze + HTTP2_FALLBACK_TO_HTTP1 = "any".freeze + end +end