From 5d4c876af384d5c21147cb4511547cd31596c75d Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 12 Sep 2023 20:29:56 +0000 Subject: [PATCH] Regenerate client from commit bc2ae18f of spec repo --- .apigentools-info | 8 ++-- .generator/schemas/v1/openapi.yaml | 11 ++++++ docs/datadog_api_client.v1.model.rst | 7 ++++ .../CreateSyntheticsAPITest_1487281163.py | 2 + .../v1/model/synthetics_assertion.py | 3 ++ .../v1/model/synthetics_assertion_target.py | 10 +++++ .../synthetics_assertion_timings_scope.py | 38 +++++++++++++++++++ src/datadog_api_client/v1/models/__init__.py | 2 + ...s_the_created_test_details_response.frozen | 2 +- ...rns_the_created_test_details_response.yaml | 14 +++---- ...dit_an_api_test_returns_ok_response.frozen | 2 +- ..._edit_an_api_test_returns_ok_response.yaml | 26 ++++++------- ...t_get_a_synthetics_monitors_details.frozen | 2 +- ...est_get_a_synthetics_monitors_details.yaml | 20 +++++----- ...synthetic_tests_returns_ok_response.frozen | 2 +- ...r_synthetic_tests_returns_ok_response.yaml | 18 ++++----- tests/v1/features/given.json | 2 +- .../synthetics_api_http_test_payload.json | 2 +- 18 files changed, 122 insertions(+), 49 deletions(-) create mode 100644 src/datadog_api_client/v1/model/synthetics_assertion_timings_scope.py diff --git a/.apigentools-info b/.apigentools-info index ea9d15d9e8..913998ce4d 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.5", - "regenerated": "2023-09-12 17:52:26.336386", - "spec_repo_commit": "752c972d" + "regenerated": "2023-09-12 20:28:32.678363", + "spec_repo_commit": "bc2ae18f" }, "v2": { "apigentools_version": "1.6.5", - "regenerated": "2023-09-12 17:52:26.350823", - "spec_repo_commit": "752c972d" + "regenerated": "2023-09-12 20:28:32.694366", + "spec_repo_commit": "bc2ae18f" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index f19a927504..bec74a5242 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -12575,6 +12575,8 @@ components: target: description: Value used by the operator. example: 123456 + timingsScope: + $ref: '#/components/schemas/SyntheticsAssertionTimingsScope' type: $ref: '#/components/schemas/SyntheticsAssertionType' required: @@ -12582,6 +12584,15 @@ components: - operator - target type: object + SyntheticsAssertionTimingsScope: + description: Timings scope for response time assertions. + enum: + - all + - withoutDNS + type: string + x-enum-varnames: + - ALL + - WITHOUT_DNS SyntheticsAssertionType: description: Type of the assertion. enum: diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index 5b1ad223da..df40aa2a00 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -3641,6 +3641,13 @@ synthetics\_assertion\_target :members: :show-inheritance: +synthetics\_assertion\_timings\_scope +------------------------------------- + +.. automodule:: datadog_api_client.v1.model.synthetics_assertion_timings_scope + :members: + :show-inheritance: + synthetics\_assertion\_type --------------------------- diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py index 0ce937ee47..07ec8e9582 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py @@ -14,6 +14,7 @@ ) from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget +from datadog_api_client.v1.model.synthetics_assertion_timings_scope import SyntheticsAssertionTimingsScope from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType from datadog_api_client.v1.model.synthetics_assertion_x_path_operator import SyntheticsAssertionXPathOperator from datadog_api_client.v1.model.synthetics_assertion_x_path_target import SyntheticsAssertionXPathTarget @@ -48,6 +49,7 @@ operator=SyntheticsAssertionOperator.LESS_THAN, target=2000, type=SyntheticsAssertionType.RESPONSE_TIME, + timings_scope=SyntheticsAssertionTimingsScope.WITHOUT_DNS, ), SyntheticsAssertionJSONPathTarget( operator=SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH, diff --git a/src/datadog_api_client/v1/model/synthetics_assertion.py b/src/datadog_api_client/v1/model/synthetics_assertion.py index b484f01ff0..d55489f63d 100644 --- a/src/datadog_api_client/v1/model/synthetics_assertion.py +++ b/src/datadog_api_client/v1/model/synthetics_assertion.py @@ -25,6 +25,9 @@ def __init__(self, **kwargs): :param target: Value used by the operator. :type target: bool, date, datetime, dict, float, int, list, str, none_type + :param timings_scope: Timings scope for response time assertions. + :type timings_scope: SyntheticsAssertionTimingsScope, optional + :param type: Type of the assertion. :type type: SyntheticsAssertionType """ diff --git a/src/datadog_api_client/v1/model/synthetics_assertion_target.py b/src/datadog_api_client/v1/model/synthetics_assertion_target.py index 9937e982a1..fbe594e235 100644 --- a/src/datadog_api_client/v1/model/synthetics_assertion_target.py +++ b/src/datadog_api_client/v1/model/synthetics_assertion_target.py @@ -18,6 +18,7 @@ if TYPE_CHECKING: from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator + from datadog_api_client.v1.model.synthetics_assertion_timings_scope import SyntheticsAssertionTimingsScope from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType @@ -25,6 +26,7 @@ class SyntheticsAssertionTarget(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator + from datadog_api_client.v1.model.synthetics_assertion_timings_scope import SyntheticsAssertionTimingsScope from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType return { @@ -41,6 +43,7 @@ def openapi_types(_): str, none_type, ), + "timings_scope": (SyntheticsAssertionTimingsScope,), "type": (SyntheticsAssertionType,), } @@ -48,6 +51,7 @@ def openapi_types(_): "operator": "operator", "_property": "property", "target": "target", + "timings_scope": "timingsScope", "type": "type", } @@ -57,6 +61,7 @@ def __init__( target: Any, type: SyntheticsAssertionType, _property: Union[str, UnsetType] = unset, + timings_scope: Union[SyntheticsAssertionTimingsScope, UnsetType] = unset, **kwargs, ): """ @@ -71,11 +76,16 @@ def __init__( :param target: Value used by the operator. :type target: bool, date, datetime, dict, float, int, list, str, none_type + :param timings_scope: Timings scope for response time assertions. + :type timings_scope: SyntheticsAssertionTimingsScope, optional + :param type: Type of the assertion. :type type: SyntheticsAssertionType """ if _property is not unset: kwargs["_property"] = _property + if timings_scope is not unset: + kwargs["timings_scope"] = timings_scope super().__init__(kwargs) self_.operator = operator diff --git a/src/datadog_api_client/v1/model/synthetics_assertion_timings_scope.py b/src/datadog_api_client/v1/model/synthetics_assertion_timings_scope.py new file mode 100644 index 0000000000..038ad313ef --- /dev/null +++ b/src/datadog_api_client/v1/model/synthetics_assertion_timings_scope.py @@ -0,0 +1,38 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsAssertionTimingsScope(ModelSimple): + """ + Timings scope for response time assertions. + + :param value: Must be one of ["all", "withoutDNS"]. + :type value: str + """ + + allowed_values = { + "all", + "withoutDNS", + } + ALL: ClassVar["SyntheticsAssertionTimingsScope"] + WITHOUT_DNS: ClassVar["SyntheticsAssertionTimingsScope"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsAssertionTimingsScope.ALL = SyntheticsAssertionTimingsScope("all") +SyntheticsAssertionTimingsScope.WITHOUT_DNS = SyntheticsAssertionTimingsScope("withoutDNS") diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index b2205234b2..a73654072f 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -590,6 +590,7 @@ ) from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget +from datadog_api_client.v1.model.synthetics_assertion_timings_scope import SyntheticsAssertionTimingsScope from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType from datadog_api_client.v1.model.synthetics_assertion_x_path_operator import SyntheticsAssertionXPathOperator from datadog_api_client.v1.model.synthetics_assertion_x_path_target import SyntheticsAssertionXPathTarget @@ -1439,6 +1440,7 @@ "SyntheticsAssertionJSONPathTargetTarget", "SyntheticsAssertionOperator", "SyntheticsAssertionTarget", + "SyntheticsAssertionTimingsScope", "SyntheticsAssertionType", "SyntheticsAssertionXPathOperator", "SyntheticsAssertionXPathTarget", diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.frozen index 9268a5d136..cbdcd3a7a8 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.frozen @@ -1 +1 @@ -2023-08-11T15:25:10.265Z \ No newline at end of file +2023-09-11T14:49:13.966Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.yaml index 2e3dc6ba1f..f0689c26e4 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_an_api_http_test_returns_ok_returns_the_created_test_details_response.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"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":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510"},"method":"GET","persistCookies":true,"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-1691767510","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-1691767510","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + body: '{"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":"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":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1694443753"},"method":"GET","persistCookies":true,"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-1694443753","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-1694443753","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/api response: body: - string: '{"public_id":"p5t-6vv-3xj","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-08-11T15:25:10.474768+00:00","modified_at":"2023-08-11T15:25:10.474768+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1691767510","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":128997418,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + string: '{"public_id":"459-yrn-6c6","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1694443753","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-09-11T14:49:14.209609+00:00","modified_at":"2023-09-11T14:49:14.209609+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1694443753"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1694443753","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":131183718,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: content-type: - application/json @@ -21,7 +21,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["p5t-6vv-3xj"]}' + body: '{"public_ids":["459-yrn-6c6"]}' headers: accept: - application/json @@ -31,7 +31,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: body: - string: '{"deleted_tests":[{"public_id":"p5t-6vv-3xj","deleted_at":"2023-08-11T15:25:10.679107+00:00"}]} + string: '{"deleted_tests":[{"public_id":"459-yrn-6c6","deleted_at":"2023-09-11T14:49:16.625763+00:00"}]} ' headers: diff --git a/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.frozen index 68bcd3834b..01b81d49c6 100644 --- a/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.frozen @@ -1 +1 @@ -2023-08-11T15:25:10.775Z \ No newline at end of file +2023-09-11T14:49:16.770Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.yaml index bea481f492..055feb060c 100644 --- a/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_edit_an_api_test_returns_ok_response.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"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":"testeditanapitestreturnsokresponse1691767510"},"method":"GET","persistCookies":true,"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-1691767510","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-1691767510","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + body: '{"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":"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":"testeditanapitestreturnsokresponse1694443756"},"method":"GET","persistCookies":true,"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-1694443756","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-1694443756","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/api response: body: - string: '{"public_id":"z5e-ur4-nh7","name":"Test-Edit_an_API_test_returns_OK_response-1691767510","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-08-11T15:25:11.022092+00:00","modified_at":"2023-08-11T15:25:11.022092+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1691767510"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1691767510","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":128997423,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + string: '{"public_id":"qfc-hyy-hr5","name":"Test-Edit_an_API_test_returns_OK_response-1694443756","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-09-11T14:49:16.999247+00:00","modified_at":"2023-09-11T14:49:16.999247+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testeditanapitestreturnsokresponse1694443756"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1694443756","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":131183739,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: content-type: - application/json @@ -21,20 +21,20 @@ interactions: code: 200 message: OK - request: - body: '{"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":"testeditanapitestreturnsokresponse1691767510"},"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-1691767510-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"}' + body: '{"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":"testeditanapitestreturnsokresponse1694443756"},"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-1694443756-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/z5e-ur4-nh7 + uri: https://api.datadoghq.com/api/v1/synthetics/tests/api/qfc-hyy-hr5 response: body: - string: '{"public_id":"z5e-ur4-nh7","name":"Test-Edit_an_API_test_returns_OK_response-1691767510-updated","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-08-11T15:25:11.022092+00:00","modified_at":"2023-08-11T15:25:11.302824+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"}],"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":"testeditanapitestreturnsokresponse1691767510"},"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":128997423,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + string: '{"public_id":"qfc-hyy-hr5","name":"Test-Edit_an_API_test_returns_OK_response-1694443756-updated","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-09-11T14:49:16.999247+00:00","modified_at":"2023-09-11T14:49:17.801923+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"}],"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":"testeditanapitestreturnsokresponse1694443756"},"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":131183739,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: content-type: - application/json @@ -42,7 +42,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["z5e-ur4-nh7"]}' + body: '{"public_ids":["qfc-hyy-hr5"]}' headers: accept: - application/json @@ -52,7 +52,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: body: - string: '{"deleted_tests":[{"public_id":"z5e-ur4-nh7","deleted_at":"2023-08-11T15:25:12.475026+00:00"}]} + string: '{"deleted_tests":[{"public_id":"qfc-hyy-hr5","deleted_at":"2023-09-11T14:49:18.248113+00:00"}]} ' headers: diff --git a/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.frozen b/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.frozen index a0de65aaef..d234b8822e 100644 --- a/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.frozen +++ b/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.frozen @@ -1 +1 @@ -2023-08-11T15:25:09.392Z \ No newline at end of file +2023-09-11T14:49:13.051Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.yaml b/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.yaml index 7d2ad12eb0..c60ff12bd6 100644 --- a/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.yaml +++ b/tests/v1/cassettes/test_scenarios/test_get_a_synthetics_monitors_details.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"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":"testgetasyntheticsmonitorsdetails1691767509"},"method":"GET","persistCookies":true,"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-1691767509","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-1691767509","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + body: '{"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":"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":"testgetasyntheticsmonitorsdetails1694443753"},"method":"GET","persistCookies":true,"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-1694443753","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-1694443753","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/api response: body: - string: '{"public_id":"6w4-5d4-j7y","name":"Test-Get_a_synthetics_monitor_s_details-1691767509","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-08-11T15:25:09.641255+00:00","modified_at":"2023-08-11T15:25:09.641255+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testgetasyntheticsmonitorsdetails1691767509"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1691767509","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":128997413,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + string: '{"public_id":"iqq-3xd-e25","name":"Test-Get_a_synthetics_monitor_s_details-1694443753","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-09-11T14:49:13.337325+00:00","modified_at":"2023-09-11T14:49:13.337325+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testgetasyntheticsmonitorsdetails1694443753"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1694443753","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":131183716,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: content-type: - application/json @@ -26,11 +26,11 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v1/monitor/128997413 + uri: https://api.datadoghq.com/api/v1/monitor/131183716 response: body: - string: '{"id":128997413,"org_id":321813,"type":"synthetics alert","name":"Test-Get_a_synthetics_monitor_s_details-1691767509","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":"6w4-5d4-j7y","silenced":{}},"multi":false,"created_at":1691767509000,"created":"2023-08-11T15:25:09.617676+00:00","modified":"2023-08-11T15:25:09.617676+00:00","deleted":null,"restricted_roles":null,"priority":5,"overall_state_modified":null,"overall_state":"No + string: '{"id":131183716,"org_id":321813,"type":"synthetics alert","name":"Test-Get_a_synthetics_monitor_s_details-1694443753","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":"iqq-3xd-e25","silenced":{}},"multi":false,"created_at":1694443753000,"created":"2023-09-11T14:49:13.292416+00:00","modified":"2023-09-11T14:49:13.292416+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}} ' @@ -41,7 +41,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["6w4-5d4-j7y"]}' + body: '{"public_ids":["iqq-3xd-e25"]}' headers: accept: - application/json @@ -51,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: body: - string: '{"deleted_tests":[{"public_id":"6w4-5d4-j7y","deleted_at":"2023-08-11T15:25:09.982551+00:00"}]} + string: '{"deleted_tests":[{"public_id":"iqq-3xd-e25","deleted_at":"2023-09-11T14:49:13.722110+00:00"}]} ' headers: diff --git a/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.frozen index 0a3893e58e..c483c717af 100644 --- a/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.frozen @@ -1 +1 @@ -2023-08-11T15:25:12.587Z \ No newline at end of file +2023-09-11T14:49:18.367Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.yaml index 559e91313b..2a1f832d0f 100644 --- a/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_trigger_synthetic_tests_returns_ok_response.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"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":"testtriggersynthetictestsreturnsokresponse1691767512"},"method":"GET","persistCookies":true,"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_Synthetic_tests_returns_OK_response-1691767512","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-1691767512","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' + body: '{"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":"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":"testtriggersynthetictestsreturnsokresponse1694443758"},"method":"GET","persistCookies":true,"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_Synthetic_tests_returns_OK_response-1694443758","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-1694443758","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/api response: body: - string: '{"public_id":"bqg-36t-cy2","name":"Test-Trigger_Synthetic_tests_returns_OK_response-1691767512","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-08-11T15:25:12.805531+00:00","modified_at":"2023-08-11T15:25:12.805531+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testtriggersynthetictestsreturnsokresponse1691767512"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1691767512","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":128997443,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + string: '{"public_id":"26u-yie-mnd","name":"Test-Trigger_Synthetic_tests_returns_OK_response-1694443758","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-09-11T14:49:18.613748+00:00","modified_at":"2023-09-11T14:49:18.613748+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":"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":{"filename":"cert-filename","updatedAt":"2020-10-16T09:23:24.857Z"},"key":{"filename":"key-filename","updatedAt":"2020-10-16T09:23:24.857Z"}},"headers":{"unique":"testtriggersynthetictestsreturnsokresponse1694443758"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"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-1694443758","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":131183740,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: content-type: - application/json @@ -21,7 +21,7 @@ interactions: code: 200 message: OK - request: - body: '{"tests":[{"public_id":"bqg-36t-cy2"}]}' + body: '{"tests":[{"public_id":"26u-yie-mnd"}]}' headers: accept: - application/json @@ -31,7 +31,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/trigger response: body: - string: '{"triggered_check_ids":["bqg-36t-cy2"],"results":[{"public_id":"bqg-36t-cy2","location":30005,"result_id":"2121674931074096424"}],"locations":[{"id":30005,"name":"aws:us-east-2","display_name":"Ohio + string: '{"triggered_check_ids":["26u-yie-mnd"],"results":[{"public_id":"26u-yie-mnd","location":30005,"result_id":"8959055245200670536"}],"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} ' @@ -42,7 +42,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["bqg-36t-cy2"]}' + body: '{"public_ids":["26u-yie-mnd"]}' headers: accept: - application/json @@ -52,7 +52,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: body: - string: '{"deleted_tests":[{"public_id":"bqg-36t-cy2","deleted_at":"2023-08-11T15:25:14.357520+00:00"}]} + string: '{"deleted_tests":[{"public_id":"26u-yie-mnd","deleted_at":"2023-09-11T14:49:19.021129+00:00"}]} ' headers: diff --git a/tests/v1/features/given.json b/tests/v1/features/given.json index 2f0b4c3db6..ea1945985b 100644 --- a/tests/v1/features/given.json +++ b/tests/v1/features/given.json @@ -199,7 +199,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 \"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 { \"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\": \"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 \"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/tests/v1/features/synthetics_api_http_test_payload.json b/tests/v1/features/synthetics_api_http_test_payload.json index 60627f7ea4..023cf3bd3a 100644 --- a/tests/v1/features/synthetics_api_http_test_payload.json +++ b/tests/v1/features/synthetics_api_http_test_payload.json @@ -7,7 +7,7 @@ "target": "text/html", "type": "header" }, - { "operator": "lessThan", "target": 2000, "type": "responseTime" }, + { "operator": "lessThan", "target": 2000, "type": "responseTime", "timingsScope": "withoutDNS" }, { "operator": "validatesJSONPath", "target": {