diff --git a/.apigentools-info b/.apigentools-info index 97ddb61978..11bcdd7381 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-06-19 10:10:09.090441", - "spec_repo_commit": "4edb50e4" + "regenerated": "2024-06-25 09:59:17.409553", + "spec_repo_commit": "86b68b75" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-06-19 10:10:09.107922", - "spec_repo_commit": "4edb50e4" + "regenerated": "2024-06-25 09:59:17.430030", + "spec_repo_commit": "86b68b75" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 5042e59fc9..abf6e4d615 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -13370,47 +13370,9 @@ components: type: object SyntheticsAPIStep: description: The steps used in a Synthetic multistep API test. - properties: - allowFailure: - description: Determines whether or not to continue with test if this step - fails. - type: boolean - assertions: - default: [] - description: Array of assertions used for the test. - example: - - operator: lessThan - target: 1000 - type: responseTime - items: - $ref: '#/components/schemas/SyntheticsAssertion' - type: array - extractedValues: - description: Array of values to parse and save as variables from the response. - items: - $ref: '#/components/schemas/SyntheticsParsingOptions' - type: array - isCritical: - description: 'Determines whether or not to consider the entire test as failed - if this step fails. - - Can be used only if `allowFailure` is `true`.' - type: boolean - name: - description: The name of the step. - example: Example step name - type: string - request: - $ref: '#/components/schemas/SyntheticsTestRequest' - retry: - $ref: '#/components/schemas/SyntheticsTestOptionsRetry' - subtype: - $ref: '#/components/schemas/SyntheticsAPIStepSubtype' - required: - - assertions - - request - - name - - subtype + oneOf: + - $ref: '#/components/schemas/SyntheticsAPITestStep' + - $ref: '#/components/schemas/SyntheticsAPIWaitStep' type: object SyntheticsAPIStepSubtype: description: The subtype of the Synthetic multistep API test step, currently @@ -13418,11 +13380,13 @@ components: enum: - http - grpc + - wait example: http type: string x-enum-varnames: - HTTP - GRPC + - WAIT SyntheticsAPITest: description: Object containing details about a Synthetic API test. properties: @@ -13611,6 +13575,50 @@ components: timings: $ref: '#/components/schemas/SyntheticsTiming' type: object + SyntheticsAPITestStep: + description: The Test step used in a Synthetic multistep API test. + properties: + allowFailure: + description: Determines whether or not to continue with test if this step + fails. + type: boolean + assertions: + default: [] + description: Array of assertions used for the test. + example: + - operator: lessThan + target: 1000 + type: responseTime + items: + $ref: '#/components/schemas/SyntheticsAssertion' + type: array + extractedValues: + description: Array of values to parse and save as variables from the response. + items: + $ref: '#/components/schemas/SyntheticsParsingOptions' + type: array + isCritical: + description: 'Determines whether or not to consider the entire test as failed + if this step fails. + + Can be used only if `allowFailure` is `true`.' + type: boolean + name: + description: The name of the step. + example: Example step name + type: string + request: + $ref: '#/components/schemas/SyntheticsTestRequest' + retry: + $ref: '#/components/schemas/SyntheticsTestOptionsRetry' + subtype: + $ref: '#/components/schemas/SyntheticsAPIStepSubtype' + required: + - assertions + - request + - name + - subtype + type: object SyntheticsAPITestType: default: api description: Type of the Synthetic test, `api`. @@ -13620,6 +13628,28 @@ components: type: string x-enum-varnames: - API + SyntheticsAPIWaitStep: + description: The Wait step used in a Synthetic multistep API test. + properties: + name: + description: The name of the step. + example: Example step name + type: string + subtype: + $ref: '#/components/schemas/SyntheticsAPIStepSubtype' + value: + description: The time to wait in seconds. Minimum value is 0, maximum value + is 180. + example: 5 + format: int32 + maximum: 180 + minimum: 0 + type: integer + required: + - name + - subtype + - value + type: object SyntheticsApiTestFailureCode: description: Error code that can be returned by a Synthetic test. enum: diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index 3632b98d6f..026f331186 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -3844,6 +3844,13 @@ synthetics\_api\_test\_result\_short\_result :members: :show-inheritance: +synthetics\_api\_test\_step +--------------------------- + +.. automodule:: datadog_api_client.v1.model.synthetics_api_test_step + :members: + :show-inheritance: + synthetics\_api\_test\_type --------------------------- @@ -3851,6 +3858,13 @@ synthetics\_api\_test\_type :members: :show-inheritance: +synthetics\_api\_wait\_step +--------------------------- + +.. automodule:: datadog_api_client.v1.model.synthetics_api_wait_step + :members: + :show-inheritance: + synthetics\_assertion --------------------- diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py index b3f7e27594..d6cdc40157 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py @@ -4,11 +4,12 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.synthetics_api_step import SyntheticsAPIStep from datadog_api_client.v1.model.synthetics_api_step_subtype import SyntheticsAPIStepSubtype from datadog_api_client.v1.model.synthetics_api_test import SyntheticsAPITest from datadog_api_client.v1.model.synthetics_api_test_config import SyntheticsAPITestConfig +from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType +from datadog_api_client.v1.model.synthetics_api_wait_step import SyntheticsAPIWaitStep 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_type import SyntheticsAssertionType @@ -39,7 +40,7 @@ ), ], steps=[ - SyntheticsAPIStep( + SyntheticsAPITestStep( allow_failure=True, assertions=[ SyntheticsAssertionTarget( @@ -73,7 +74,12 @@ ), subtype=SyntheticsAPIStepSubtype.HTTP, ), - SyntheticsAPIStep( + SyntheticsAPIWaitStep( + name="Wait", + subtype=SyntheticsAPIStepSubtype.WAIT, + value=1, + ), + SyntheticsAPITestStep( name="GRPC CALL", subtype=SyntheticsAPIStepSubtype.GRPC, extracted_values=[], diff --git a/src/datadog_api_client/v1/model/synthetics_api_step.py b/src/datadog_api_client/v1/model/synthetics_api_step.py index c24fecc397..26f63161d7 100644 --- a/src/datadog_api_client/v1/model/synthetics_api_step.py +++ b/src/datadog_api_client/v1/model/synthetics_api_step.py @@ -3,65 +3,15 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( - ModelNormal, + ModelComposed, cached_property, - unset, - UnsetType, ) -if TYPE_CHECKING: - from datadog_api_client.v1.model.synthetics_parsing_options import SyntheticsParsingOptions - from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest - from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry - from datadog_api_client.v1.model.synthetics_api_step_subtype import SyntheticsAPIStepSubtype - - -class SyntheticsAPIStep(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v1.model.synthetics_assertion import SyntheticsAssertion - from datadog_api_client.v1.model.synthetics_parsing_options import SyntheticsParsingOptions - from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest - from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry - from datadog_api_client.v1.model.synthetics_api_step_subtype import SyntheticsAPIStepSubtype - - return { - "allow_failure": (bool,), - "assertions": ([SyntheticsAssertion],), - "extracted_values": ([SyntheticsParsingOptions],), - "is_critical": (bool,), - "name": (str,), - "request": (SyntheticsTestRequest,), - "retry": (SyntheticsTestOptionsRetry,), - "subtype": (SyntheticsAPIStepSubtype,), - } - - attribute_map = { - "allow_failure": "allowFailure", - "assertions": "assertions", - "extracted_values": "extractedValues", - "is_critical": "isCritical", - "name": "name", - "request": "request", - "retry": "retry", - "subtype": "subtype", - } - - def __init__( - self_, - name: str, - request: SyntheticsTestRequest, - subtype: SyntheticsAPIStepSubtype, - allow_failure: Union[bool, UnsetType] = unset, - extracted_values: Union[List[SyntheticsParsingOptions], UnsetType] = unset, - is_critical: Union[bool, UnsetType] = unset, - retry: Union[SyntheticsTestOptionsRetry, UnsetType] = unset, - **kwargs, - ): +class SyntheticsAPIStep(ModelComposed): + def __init__(self, **kwargs): """ The steps used in a Synthetic multistep API test. @@ -75,7 +25,7 @@ def __init__( :type extracted_values: [SyntheticsParsingOptions], optional :param is_critical: Determines whether or not to consider the entire test as failed if this step fails. - Can be used only if ``allowFailure`` is ``true``. + Can be used only if `allowFailure` is `true`. :type is_critical: bool, optional :param name: The name of the step. @@ -87,21 +37,29 @@ def __init__( :param retry: Object describing the retry strategy to apply to a Synthetic test. :type retry: SyntheticsTestOptionsRetry, optional - :param subtype: The subtype of the Synthetic multistep API test step, currently only supporting ``http``. + :param subtype: The subtype of the Synthetic multistep API test step, currently only supporting `http`. :type subtype: SyntheticsAPIStepSubtype + + :param value: The time to wait in seconds. Minimum value is 0, maximum value is 180. + :type value: int """ - if allow_failure is not unset: - kwargs["allow_failure"] = allow_failure - if extracted_values is not unset: - kwargs["extracted_values"] = extracted_values - if is_critical is not unset: - kwargs["is_critical"] = is_critical - if retry is not unset: - kwargs["retry"] = retry super().__init__(kwargs) - assertions = kwargs.get("assertions", []) - self_.assertions = assertions - self_.name = name - self_.request = request - self_.subtype = subtype + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep + from datadog_api_client.v1.model.synthetics_api_wait_step import SyntheticsAPIWaitStep + + return { + "oneOf": [ + SyntheticsAPITestStep, + SyntheticsAPIWaitStep, + ], + } diff --git a/src/datadog_api_client/v1/model/synthetics_api_step_subtype.py b/src/datadog_api_client/v1/model/synthetics_api_step_subtype.py index bc28383398..28a6f08d95 100644 --- a/src/datadog_api_client/v1/model/synthetics_api_step_subtype.py +++ b/src/datadog_api_client/v1/model/synthetics_api_step_subtype.py @@ -16,16 +16,18 @@ class SyntheticsAPIStepSubtype(ModelSimple): """ The subtype of the Synthetic multistep API test step, currently only supporting `http`. - :param value: Must be one of ["http", "grpc"]. + :param value: Must be one of ["http", "grpc", "wait"]. :type value: str """ allowed_values = { "http", "grpc", + "wait", } HTTP: ClassVar["SyntheticsAPIStepSubtype"] GRPC: ClassVar["SyntheticsAPIStepSubtype"] + WAIT: ClassVar["SyntheticsAPIStepSubtype"] @cached_property def openapi_types(_): @@ -36,3 +38,4 @@ def openapi_types(_): SyntheticsAPIStepSubtype.HTTP = SyntheticsAPIStepSubtype("http") SyntheticsAPIStepSubtype.GRPC = SyntheticsAPIStepSubtype("grpc") +SyntheticsAPIStepSubtype.WAIT = SyntheticsAPIStepSubtype("wait") diff --git a/src/datadog_api_client/v1/model/synthetics_api_test_config.py b/src/datadog_api_client/v1/model/synthetics_api_test_config.py index 9249ef007d..98823c7ec6 100644 --- a/src/datadog_api_client/v1/model/synthetics_api_test_config.py +++ b/src/datadog_api_client/v1/model/synthetics_api_test_config.py @@ -23,6 +23,8 @@ from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget from datadog_api_client.v1.model.synthetics_assertion_json_schema_target import SyntheticsAssertionJSONSchemaTarget from datadog_api_client.v1.model.synthetics_assertion_x_path_target import SyntheticsAssertionXPathTarget + from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep + from datadog_api_client.v1.model.synthetics_api_wait_step import SyntheticsAPIWaitStep class SyntheticsAPITestConfig(ModelNormal): @@ -66,7 +68,7 @@ def __init__( ] = unset, config_variables: Union[List[SyntheticsConfigVariable], UnsetType] = unset, request: Union[SyntheticsTestRequest, UnsetType] = unset, - steps: Union[List[SyntheticsAPIStep], UnsetType] = unset, + steps: Union[List[Union[SyntheticsAPIStep, SyntheticsAPITestStep, SyntheticsAPIWaitStep]], UnsetType] = unset, variables_from_script: Union[str, UnsetType] = unset, **kwargs, ): diff --git a/src/datadog_api_client/v1/model/synthetics_api_test_step.py b/src/datadog_api_client/v1/model/synthetics_api_test_step.py new file mode 100644 index 0000000000..c94751dd34 --- /dev/null +++ b/src/datadog_api_client/v1/model/synthetics_api_test_step.py @@ -0,0 +1,107 @@ +# 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 typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v1.model.synthetics_parsing_options import SyntheticsParsingOptions + from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest + from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry + from datadog_api_client.v1.model.synthetics_api_step_subtype import SyntheticsAPIStepSubtype + + +class SyntheticsAPITestStep(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.synthetics_assertion import SyntheticsAssertion + from datadog_api_client.v1.model.synthetics_parsing_options import SyntheticsParsingOptions + from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest + from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry + from datadog_api_client.v1.model.synthetics_api_step_subtype import SyntheticsAPIStepSubtype + + return { + "allow_failure": (bool,), + "assertions": ([SyntheticsAssertion],), + "extracted_values": ([SyntheticsParsingOptions],), + "is_critical": (bool,), + "name": (str,), + "request": (SyntheticsTestRequest,), + "retry": (SyntheticsTestOptionsRetry,), + "subtype": (SyntheticsAPIStepSubtype,), + } + + attribute_map = { + "allow_failure": "allowFailure", + "assertions": "assertions", + "extracted_values": "extractedValues", + "is_critical": "isCritical", + "name": "name", + "request": "request", + "retry": "retry", + "subtype": "subtype", + } + + def __init__( + self_, + name: str, + request: SyntheticsTestRequest, + subtype: SyntheticsAPIStepSubtype, + allow_failure: Union[bool, UnsetType] = unset, + extracted_values: Union[List[SyntheticsParsingOptions], UnsetType] = unset, + is_critical: Union[bool, UnsetType] = unset, + retry: Union[SyntheticsTestOptionsRetry, UnsetType] = unset, + **kwargs, + ): + """ + The Test step used in a Synthetic multistep API test. + + :param allow_failure: Determines whether or not to continue with test if this step fails. + :type allow_failure: bool, optional + + :param assertions: Array of assertions used for the test. + :type assertions: [SyntheticsAssertion] + + :param extracted_values: Array of values to parse and save as variables from the response. + :type extracted_values: [SyntheticsParsingOptions], optional + + :param is_critical: Determines whether or not to consider the entire test as failed if this step fails. + Can be used only if ``allowFailure`` is ``true``. + :type is_critical: bool, optional + + :param name: The name of the step. + :type name: str + + :param request: Object describing the Synthetic test request. + :type request: SyntheticsTestRequest + + :param retry: Object describing the retry strategy to apply to a Synthetic test. + :type retry: SyntheticsTestOptionsRetry, optional + + :param subtype: The subtype of the Synthetic multistep API test step, currently only supporting ``http``. + :type subtype: SyntheticsAPIStepSubtype + """ + if allow_failure is not unset: + kwargs["allow_failure"] = allow_failure + if extracted_values is not unset: + kwargs["extracted_values"] = extracted_values + if is_critical is not unset: + kwargs["is_critical"] = is_critical + if retry is not unset: + kwargs["retry"] = retry + super().__init__(kwargs) + assertions = kwargs.get("assertions", []) + + self_.assertions = assertions + self_.name = name + self_.request = request + self_.subtype = subtype diff --git a/src/datadog_api_client/v1/model/synthetics_api_wait_step.py b/src/datadog_api_client/v1/model/synthetics_api_wait_step.py new file mode 100644 index 0000000000..cbc1706611 --- /dev/null +++ b/src/datadog_api_client/v1/model/synthetics_api_wait_step.py @@ -0,0 +1,59 @@ +# 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 typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v1.model.synthetics_api_step_subtype import SyntheticsAPIStepSubtype + + +class SyntheticsAPIWaitStep(ModelNormal): + validations = { + "value": { + "inclusive_maximum": 180, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.synthetics_api_step_subtype import SyntheticsAPIStepSubtype + + return { + "name": (str,), + "subtype": (SyntheticsAPIStepSubtype,), + "value": (int,), + } + + attribute_map = { + "name": "name", + "subtype": "subtype", + "value": "value", + } + + def __init__(self_, name: str, subtype: SyntheticsAPIStepSubtype, value: int, **kwargs): + """ + The Wait step used in a Synthetic multistep API test. + + :param name: The name of the step. + :type name: str + + :param subtype: The subtype of the Synthetic multistep API test step, currently only supporting ``http``. + :type subtype: SyntheticsAPIStepSubtype + + :param value: The time to wait in seconds. Minimum value is 0, maximum value is 180. + :type value: int + """ + super().__init__(kwargs) + + self_.name = name + self_.subtype = subtype + self_.value = value diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index bbe0067e46..e16b0ce70a 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -617,7 +617,9 @@ from datadog_api_client.v1.model.synthetics_api_test_result_full_check import SyntheticsAPITestResultFullCheck from datadog_api_client.v1.model.synthetics_api_test_result_short import SyntheticsAPITestResultShort from datadog_api_client.v1.model.synthetics_api_test_result_short_result import SyntheticsAPITestResultShortResult +from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType +from datadog_api_client.v1.model.synthetics_api_wait_step import SyntheticsAPIWaitStep from datadog_api_client.v1.model.synthetics_api_test_failure_code import SyntheticsApiTestFailureCode from datadog_api_client.v1.model.synthetics_api_test_result_failure import SyntheticsApiTestResultFailure from datadog_api_client.v1.model.synthetics_assertion import SyntheticsAssertion @@ -1525,7 +1527,9 @@ "SyntheticsAPITestResultFullCheck", "SyntheticsAPITestResultShort", "SyntheticsAPITestResultShortResult", + "SyntheticsAPITestStep", "SyntheticsAPITestType", + "SyntheticsAPIWaitStep", "SyntheticsApiTestFailureCode", "SyntheticsApiTestResultFailure", "SyntheticsAssertion", diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.frozen index 27e5628c1d..b492ef293e 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.frozen @@ -1 +1 @@ -2024-03-13T08:48:00.559Z \ No newline at end of file +2024-06-25T09:44:03.099Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.yaml index e4c5f07533..498c9491a1 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.yaml @@ -1,9 +1,9 @@ interactions: - request: body: '{"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request - is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"name":"Wait","subtype":"wait","value":1},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc"}]},"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' + test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' headers: accept: - application/json @@ -13,11 +13,11 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/api response: body: - string: '{"public_id":"hke-w83-j6r","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-03-13T08:48:01.233193+00:00","modified_at":"2024-03-13T08:48:01.233193+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request - is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"bba-utu-dpy"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC - CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"tax-mfs-p3v"}]},"message":"BDD - test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"},"deleted_at":null,"monitor_id":141300469,"org_id":321813,"modified_by":{"name":"CI + string: '{"public_id":"wrp-rdu-dxf","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-25T09:44:03.406642+00:00","modified_at":"2024-06-25T09:44:03.406642+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"qmy-pb4-vgr"},{"name":"Wait","subtype":"wait","value":1,"id":"jvf-pch-ag2"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"fik-npx-cmb"}]},"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"},"deleted_at":null,"monitor_id":147863645,"org_id":321813,"modified_by":{"name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"}}' headers: content-type: @@ -26,7 +26,7 @@ interactions: code: 200 message: OK - request: - body: '{"description":"","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1710319680","parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_public_id":"hke-w83-j6r","tags":[],"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}' + body: '{"description":"","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1719308643","parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_public_id":"wrp-rdu-dxf","tags":[],"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}' headers: accept: - application/json @@ -36,7 +36,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/variables response: body: - string: '{"id":"d4597027-2f9b-4595-8c10-7ea475bdcf0f","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1710319680","description":"","type":"variable","tags":[],"parse_test_public_id":"hke-w83-j6r","parse_test_name":null,"parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}} + string: '{"id":"4a3f0e26-1295-416c-be89-9490168fd92e","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1719308643","description":"","type":"variable","tags":[],"parse_test_public_id":"wrp-rdu-dxf","parse_test_name":null,"parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}} ' headers: @@ -51,7 +51,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v1/synthetics/variables/d4597027-2f9b-4595-8c10-7ea475bdcf0f + uri: https://api.datadoghq.com/api/v1/synthetics/variables/4a3f0e26-1295-416c-be89-9490168fd92e response: body: string: '' @@ -62,7 +62,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["hke-w83-j6r"]}' + body: '{"public_ids":["wrp-rdu-dxf"]}' headers: accept: - application/json @@ -72,7 +72,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: body: - string: '{"deleted_tests":[{"public_id":"hke-w83-j6r","deleted_at":"2024-03-13T08:48:02.740088+00:00"}]} + string: '{"deleted_tests":[{"public_id":"wrp-rdu-dxf","deleted_at":"2024-06-25T09:44:05.300069+00:00"}]} ' headers: diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.frozen index c7b41f31f8..d3cdf5baa4 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.frozen @@ -1 +1 @@ -2024-03-13T08:48:03.203Z \ No newline at end of file +2024-06-21T14:18:12.913Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.yaml index d3d1aad72e..767590b6bf 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_an_api_test_with_multi_subtype_returns_ok_returns_the_created_test_details_response.yaml @@ -1,9 +1,9 @@ interactions: - request: body: '{"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request - is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"name":"Wait","subtype":"wait","value":1},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc"}]},"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1710319683","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_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1710319683","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' + test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1718979492","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_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1718979492","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' headers: accept: - application/json @@ -13,12 +13,10 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/api response: body: - string: '{"public_id":"y2r-vcd-vpr","name":"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1710319683","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-03-13T08:48:03.719895+00:00","modified_at":"2024-03-13T08:48:03.719895+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request - is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"uub-ecp-afe"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC - CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"znu-k77-h5c"}]},"message":"BDD - test payload: synthetics_api_test_multi_step_payload.json","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_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1710319683","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"},"deleted_at":null,"monitor_id":141300471,"org_id":321813,"modified_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"}}' + string: '{"public_id":"wzr-2yd-ej7","name":"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1718979492","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-21T14:18:13.561327+00:00","modified_at":"2024-06-21T14:18:13.561327+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"sbr-yqk-qyr"},{"name":"Wait","subtype":"wait","value":1,"id":"whp-w67-ytk"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"pjw-dsx-qgw"}]},"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","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_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1718979492","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":147644192,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: content-type: - application/json @@ -26,7 +24,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["y2r-vcd-vpr"]}' + body: '{"public_ids":["wzr-2yd-ej7"]}' headers: accept: - application/json @@ -36,7 +34,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: body: - string: '{"deleted_tests":[{"public_id":"y2r-vcd-vpr","deleted_at":"2024-03-13T08:48:04.414269+00:00"}]} + string: '{"deleted_tests":[{"public_id":"wzr-2yd-ej7","deleted_at":"2024-06-21T14:18:14.313391+00:00"}]} ' headers: diff --git a/tests/v1/features/given.json b/tests/v1/features/given.json index 51cd045f28..a773eb3254 100644 --- a/tests/v1/features/given.json +++ b/tests/v1/features/given.json @@ -250,7 +250,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"config\": {\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\",\n \"secure\": true\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"httpVersion\": \"http2\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\"\n },\n {\n \"name\": \"GRPC CALL\",\n \"subtype\": \"grpc\",\n \"extractedValues\": [],\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"host\": \"grpcbin.test.k6.io\",\n \"port\": 9000,\n \"service\": \"grpcbin.GRPCBin\",\n \"method\": \"Index\",\n \"message\": \"{}\",\n \"compressedJsonDescriptor\": \"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==\",\n \"metadata\": {},\n \"callType\": \"unary\"\n }\n }\n ]\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_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\": 1000 },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" + "value": "{\n \"config\": {\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\",\n \"secure\": true\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"httpVersion\": \"http2\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\"\n },\n {\n \"name\": \"Wait\",\n \"subtype\": \"wait\",\n \"value\": 1\n },\n {\n \"name\": \"GRPC CALL\",\n \"subtype\": \"grpc\",\n \"extractedValues\": [],\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"host\": \"grpcbin.test.k6.io\",\n \"port\": 9000,\n \"service\": \"grpcbin.GRPCBin\",\n \"method\": \"Index\",\n \"message\": \"{}\",\n \"compressedJsonDescriptor\": \"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==\",\n \"metadata\": {},\n \"callType\": \"unary\"\n }\n }\n ]\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_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\": 1000 },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" } ], "step": "there is a valid \"synthetics_api_test_multi_step\" in the system", diff --git a/tests/v1/features/synthetics.feature b/tests/v1/features/synthetics.feature index 125d1f5bb7..a3e3e317d7 100644 --- a/tests/v1/features/synthetics.feature +++ b/tests/v1/features/synthetics.feature @@ -226,8 +226,10 @@ Feature: Synthetics And the response "config.steps[0].retry.interval" is equal to 1000 And the response "config.steps[0].request.httpVersion" is equal to "http2" And the response "config.steps[0].extractedValues[0].secure" is equal to true - And the response "config.steps[1].request.host" is equal to "grpcbin.test.k6.io" - And the response "config.steps[1].request.host" is equal to "grpcbin.test.k6.io" + And the response "config.steps[1].subtype" is equal to "wait" + And the response "config.steps[1].value" is equal to 1 + And the response "config.steps[2].request.host" is equal to "grpcbin.test.k6.io" + And the response "config.steps[2].request.host" is equal to "grpcbin.test.k6.io" @generated @skip @team:DataDog/synthetics-ct Scenario: Delete a global variable returns "JSON format is wrong" response diff --git a/tests/v1/features/synthetics_api_test_multi_step_payload.json b/tests/v1/features/synthetics_api_test_multi_step_payload.json index 214ce5297f..45c07087cf 100644 --- a/tests/v1/features/synthetics_api_test_multi_step_payload.json +++ b/tests/v1/features/synthetics_api_test_multi_step_payload.json @@ -43,6 +43,11 @@ }, "subtype": "http" }, + { + "name": "Wait", + "subtype": "wait", + "value": 1 + }, { "name": "GRPC CALL", "subtype": "grpc",