From c1fe076febd582c4974c33253ff0e31405a5fddc Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 28 Nov 2022 20:56:28 +0000 Subject: [PATCH] Regenerate client from commit 6734a5cb of spec repo --- .apigentools-info | 8 +-- .generator/schemas/v1/openapi.yaml | 40 +++++++------- docs/datadog_api_client.v1.model.rst | 14 ++--- .../v1/synthetics/CreateSyntheticsAPITest.py | 3 +- .../CreateSyntheticsAPITest_1279271422.py | 3 +- .../CreateSyntheticsAPITest_1402674167.py | 3 +- .../CreateSyntheticsAPITest_1487281163.py | 3 +- .../synthetics/CreateSyntheticsBrowserTest.py | 3 +- .../CreateSyntheticsBrowserTest_2932742688.py | 3 +- examples/v1/synthetics/UpdateAPITest.py | 3 +- examples/v1/synthetics/UpdateBrowserTest.py | 5 +- .../v1/model/http_method.py | 53 ------------------- .../v1/model/synthetics_test_call_type.py | 38 +++++++++++++ .../v1/model/synthetics_test_request.py | 22 +++++--- src/datadog_api_client/v1/models/__init__.py | 2 +- tests/v1/features/synthetics.feature | 10 ++-- 16 files changed, 98 insertions(+), 115 deletions(-) delete mode 100644 src/datadog_api_client/v1/model/http_method.py create mode 100644 src/datadog_api_client/v1/model/synthetics_test_call_type.py diff --git a/.apigentools-info b/.apigentools-info index 6fca9ef66c..29254f6cff 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2022-11-28 14:42:36.521894", - "spec_repo_commit": "4b671e2f" + "regenerated": "2022-11-28 20:55:30.833096", + "spec_repo_commit": "6734a5cb" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2022-11-28 14:42:36.534057", - "spec_repo_commit": "4b671e2f" + "regenerated": "2022-11-28 20:55:30.844380", + "spec_repo_commit": "6734a5cb" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 9d0e7219c8..6aaf1cab4e 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -3116,26 +3116,6 @@ components: required: - message type: object - HTTPMethod: - description: The HTTP method. - enum: - - GET - - POST - - PATCH - - PUT - - DELETE - - HEAD - - OPTIONS - example: GET - type: string - x-enum-varnames: - - GET - - POST - - PATCH - - PUT - - DELETE - - HEAD - - OPTIONS HeatMapWidgetDefinition: description: The heat map visualization shows metrics aggregated across many tags, such as hosts. The more hosts that have a particular value, the darker @@ -13089,6 +13069,16 @@ components: - TYPE_TEXT - UPLOAD_FILES - WAIT + SyntheticsTestCallType: + description: The type of gRPC call to perform. + enum: + - healthcheck + - unary + example: unary + type: string + x-enum-varnames: + - HEALTHCHECK + - UNARY SyntheticsTestCiOptions: description: CI/CD options for a Synthetic test. properties: @@ -13396,6 +13386,8 @@ components: type: string bodyType: $ref: '#/components/schemas/SyntheticsTestRequestBodyType' + callType: + $ref: '#/components/schemas/SyntheticsTestCallType' certificate: $ref: '#/components/schemas/SyntheticsTestRequestCertificate' certificateDomains: @@ -13431,7 +13423,10 @@ components: metadata: $ref: '#/components/schemas/SyntheticsTestMetadata' method: - $ref: '#/components/schemas/HTTPMethod' + description: Either the HTTP method/verb to use or a gRPC method available + on the service set in the `service` field. Required if `subtype` is `HTTP` + or if `subtype` is `grpc` and `callType` is `unary`. + type: string noSavingResponseBody: description: Determines whether or not to save the response body. type: boolean @@ -13459,7 +13454,8 @@ components: the same IP address and TCP port number.' type: string service: - description: gRPC service on which you want to perform the healthcheck. + description: The gRPC service on which you want to perform the gRPC call. + example: Greeter type: string shouldTrackHops: description: Turns on a traceroute probe to discover all gateways along diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index 4ced09deb7..7c82781658 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -1107,13 +1107,6 @@ http\_log\_item :members: :show-inheritance: -http\_method ------------- - -.. automodule:: datadog_api_client.v1.model.http_method - :members: - :show-inheritance: - i\_frame\_widget\_definition ---------------------------- @@ -3942,6 +3935,13 @@ synthetics\_step\_type :members: :show-inheritance: +synthetics\_test\_call\_type +---------------------------- + +.. automodule:: datadog_api_client.v1.model.synthetics_test_call_type + :members: + :show-inheritance: + synthetics\_test\_ci\_options ----------------------------- diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest.py b/examples/v1/synthetics/CreateSyntheticsAPITest.py index f17e2e8500..6e0db43f5a 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest.py +++ b/examples/v1/synthetics/CreateSyntheticsAPITest.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod 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_type import SyntheticsAPITestType @@ -33,7 +32,7 @@ ), ], request=SyntheticsTestRequest( - method=HTTPMethod.GET, + method="GET", url="https://example.com", ), ), diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py index 3b174107e9..40d6ff8d96 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod 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 @@ -59,7 +58,7 @@ is_critical=True, name="request is sent", request=SyntheticsTestRequest( - method=HTTPMethod.GET, + method="GET", timeout=10.0, url="https://datadoghq.com", ), diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.py b/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.py index 5d08c29b6a..9fb4b7e6d8 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.py +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod 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_type import SyntheticsAPITestType @@ -30,7 +29,7 @@ host="localhost", port=50051, service="Hello", - method=HTTPMethod.GET, + method="GET", message="", metadata=SyntheticsTestMetadata(), ), diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py index ede0432fb4..f360948125 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod 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_type import SyntheticsAPITestType @@ -92,7 +91,7 @@ headers=SyntheticsTestHeaders( unique="examplecreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse", ), - method=HTTPMethod.GET, + method="GET", timeout=10.0, url="https://datadoghq.com", proxy=SyntheticsTestRequestProxy( diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest.py b/examples/v1/synthetics/CreateSyntheticsBrowserTest.py index 53f39b7061..f6e84bcd20 100644 --- a/examples/v1/synthetics/CreateSyntheticsBrowserTest.py +++ b/examples/v1/synthetics/CreateSyntheticsBrowserTest.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod from datadog_api_client.v1.model.synthetics_browser_test import SyntheticsBrowserTest from datadog_api_client.v1.model.synthetics_browser_test_config import SyntheticsBrowserTestConfig from datadog_api_client.v1.model.synthetics_browser_test_type import SyntheticsBrowserTestType @@ -29,7 +28,7 @@ ), ], request=SyntheticsTestRequest( - method=HTTPMethod.GET, + method="GET", url="https://datadoghq.com", ), set_cookie="name:test", diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.py b/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.py index 7acd604080..471d047a3f 100644 --- a/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.py +++ b/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod from datadog_api_client.v1.model.synthetics_browser_test import SyntheticsBrowserTest from datadog_api_client.v1.model.synthetics_browser_test_config import SyntheticsBrowserTestConfig from datadog_api_client.v1.model.synthetics_browser_test_rum_settings import SyntheticsBrowserTestRumSettings @@ -32,7 +31,7 @@ ), ], request=SyntheticsTestRequest( - method=HTTPMethod.GET, + method="GET", url="https://datadoghq.com", certificate_domains=[ "https://datadoghq.com", diff --git a/examples/v1/synthetics/UpdateAPITest.py b/examples/v1/synthetics/UpdateAPITest.py index 53a46c5654..37691773b5 100644 --- a/examples/v1/synthetics/UpdateAPITest.py +++ b/examples/v1/synthetics/UpdateAPITest.py @@ -5,7 +5,6 @@ from os import environ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod 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_type import SyntheticsAPITestType @@ -77,7 +76,7 @@ headers=SyntheticsTestHeaders( unique="exampleeditanapitestreturnsokresponse", ), - method=HTTPMethod.GET, + method="GET", timeout=10.0, url="https://datadoghq.com", ), diff --git a/examples/v1/synthetics/UpdateBrowserTest.py b/examples/v1/synthetics/UpdateBrowserTest.py index ba24c9b3ff..fd4ab7c8fc 100644 --- a/examples/v1/synthetics/UpdateBrowserTest.py +++ b/examples/v1/synthetics/UpdateBrowserTest.py @@ -4,7 +4,6 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.synthetics_api import SyntheticsApi -from datadog_api_client.v1.model.http_method import HTTPMethod from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType from datadog_api_client.v1.model.synthetics_browser_test import SyntheticsBrowserTest @@ -19,6 +18,7 @@ from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles from datadog_api_client.v1.model.synthetics_step import SyntheticsStep from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType +from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType from datadog_api_client.v1.model.synthetics_test_ci_options import SyntheticsTestCiOptions from datadog_api_client.v1.model.synthetics_test_execution_rule import SyntheticsTestExecutionRule from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions @@ -47,15 +47,16 @@ username="my_username", ), body_type=SyntheticsTestRequestBodyType.TEXT_PLAIN, + call_type=SyntheticsTestCallType.UNARY, certificate=SyntheticsTestRequestCertificate( cert=SyntheticsTestRequestCertificateItem(), key=SyntheticsTestRequestCertificateItem(), ), certificate_domains=[], - method=HTTPMethod.GET, proxy=SyntheticsTestRequestProxy( url="https://example.com", ), + service="Greeter", url="https://example.com", ), variables=[ diff --git a/src/datadog_api_client/v1/model/http_method.py b/src/datadog_api_client/v1/model/http_method.py deleted file mode 100644 index 4f68a46936..0000000000 --- a/src/datadog_api_client/v1/model/http_method.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 HTTPMethod(ModelSimple): - """ - The HTTP method. - - :param value: Must be one of ["GET", "POST", "PATCH", "PUT", "DELETE", "HEAD", "OPTIONS"]. - :type value: str - """ - - allowed_values = { - "GET", - "POST", - "PATCH", - "PUT", - "DELETE", - "HEAD", - "OPTIONS", - } - GET: ClassVar["HTTPMethod"] - POST: ClassVar["HTTPMethod"] - PATCH: ClassVar["HTTPMethod"] - PUT: ClassVar["HTTPMethod"] - DELETE: ClassVar["HTTPMethod"] - HEAD: ClassVar["HTTPMethod"] - OPTIONS: ClassVar["HTTPMethod"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -HTTPMethod.GET = HTTPMethod("GET") -HTTPMethod.POST = HTTPMethod("POST") -HTTPMethod.PATCH = HTTPMethod("PATCH") -HTTPMethod.PUT = HTTPMethod("PUT") -HTTPMethod.DELETE = HTTPMethod("DELETE") -HTTPMethod.HEAD = HTTPMethod("HEAD") -HTTPMethod.OPTIONS = HTTPMethod("OPTIONS") diff --git a/src/datadog_api_client/v1/model/synthetics_test_call_type.py b/src/datadog_api_client/v1/model/synthetics_test_call_type.py new file mode 100644 index 0000000000..b825306a17 --- /dev/null +++ b/src/datadog_api_client/v1/model/synthetics_test_call_type.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 SyntheticsTestCallType(ModelSimple): + """ + The type of gRPC call to perform. + + :param value: Must be one of ["healthcheck", "unary"]. + :type value: str + """ + + allowed_values = { + "healthcheck", + "unary", + } + HEALTHCHECK: ClassVar["SyntheticsTestCallType"] + UNARY: ClassVar["SyntheticsTestCallType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestCallType.HEALTHCHECK = SyntheticsTestCallType("healthcheck") +SyntheticsTestCallType.UNARY = SyntheticsTestCallType("unary") diff --git a/src/datadog_api_client/v1/model/synthetics_test_request.py b/src/datadog_api_client/v1/model/synthetics_test_request.py index 8ff1a90258..493d336303 100644 --- a/src/datadog_api_client/v1/model/synthetics_test_request.py +++ b/src/datadog_api_client/v1/model/synthetics_test_request.py @@ -16,10 +16,10 @@ if TYPE_CHECKING: from datadog_api_client.v1.model.synthetics_basic_auth import SyntheticsBasicAuth from datadog_api_client.v1.model.synthetics_test_request_body_type import SyntheticsTestRequestBodyType + from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType from datadog_api_client.v1.model.synthetics_test_request_certificate import SyntheticsTestRequestCertificate from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata - from datadog_api_client.v1.model.http_method import HTTPMethod from datadog_api_client.v1.model.synthetics_test_request_proxy import SyntheticsTestRequestProxy from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb from datadog_api_client.v1.model.synthetics_basic_auth_sigv4 import SyntheticsBasicAuthSigv4 @@ -45,10 +45,10 @@ class SyntheticsTestRequest(ModelNormal): def openapi_types(_): from datadog_api_client.v1.model.synthetics_basic_auth import SyntheticsBasicAuth from datadog_api_client.v1.model.synthetics_test_request_body_type import SyntheticsTestRequestBodyType + from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType from datadog_api_client.v1.model.synthetics_test_request_certificate import SyntheticsTestRequestCertificate from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata - from datadog_api_client.v1.model.http_method import HTTPMethod from datadog_api_client.v1.model.synthetics_test_request_proxy import SyntheticsTestRequestProxy return { @@ -56,6 +56,7 @@ def openapi_types(_): "basic_auth": (SyntheticsBasicAuth,), "body": (str,), "body_type": (SyntheticsTestRequestBodyType,), + "call_type": (SyntheticsTestCallType,), "certificate": (SyntheticsTestRequestCertificate,), "certificate_domains": ([str],), "dns_server": (str,), @@ -65,7 +66,7 @@ def openapi_types(_): "host": (str,), "message": (str,), "metadata": (SyntheticsTestMetadata,), - "method": (HTTPMethod,), + "method": (str,), "no_saving_response_body": (bool,), "number_of_packets": (int,), "port": (int,), @@ -83,6 +84,7 @@ def openapi_types(_): "basic_auth": "basicAuth", "body": "body", "body_type": "bodyType", + "call_type": "callType", "certificate": "certificate", "certificate_domains": "certificateDomains", "dns_server": "dnsServer", @@ -120,6 +122,7 @@ def __init__( ] = unset, body: Union[str, UnsetType] = unset, body_type: Union[SyntheticsTestRequestBodyType, UnsetType] = unset, + call_type: Union[SyntheticsTestCallType, UnsetType] = unset, certificate: Union[SyntheticsTestRequestCertificate, UnsetType] = unset, certificate_domains: Union[List[str], UnsetType] = unset, dns_server: Union[str, UnsetType] = unset, @@ -129,7 +132,7 @@ def __init__( host: Union[str, UnsetType] = unset, message: Union[str, UnsetType] = unset, metadata: Union[SyntheticsTestMetadata, UnsetType] = unset, - method: Union[HTTPMethod, UnsetType] = unset, + method: Union[str, UnsetType] = unset, no_saving_response_body: Union[bool, UnsetType] = unset, number_of_packets: Union[int, UnsetType] = unset, port: Union[int, UnsetType] = unset, @@ -157,6 +160,9 @@ def __init__( :param body_type: Type of the request body. :type body_type: SyntheticsTestRequestBodyType, optional + :param call_type: The type of gRPC call to perform. + :type call_type: SyntheticsTestCallType, optional + :param certificate: Client certificate to use when performing the test request. :type certificate: SyntheticsTestRequestCertificate, optional @@ -184,8 +190,8 @@ def __init__( :param metadata: Metadata to include when performing the gRPC test. :type metadata: SyntheticsTestMetadata, optional - :param method: The HTTP method. - :type method: HTTPMethod, optional + :param method: Either the HTTP method/verb to use or a gRPC method available on the service set in the ``service`` field. Required if ``subtype`` is ``HTTP`` or if ``subtype`` is ``grpc`` and ``callType`` is ``unary``. + :type method: str, optional :param no_saving_response_body: Determines whether or not to save the response body. :type no_saving_response_body: bool, optional @@ -207,7 +213,7 @@ def __init__( the same IP address and TCP port number. :type servername: str, optional - :param service: gRPC service on which you want to perform the healthcheck. + :param service: The gRPC service on which you want to perform the gRPC call. :type service: str, optional :param should_track_hops: Turns on a traceroute probe to discover all gateways along the path to the host destination. @@ -227,6 +233,8 @@ def __init__( kwargs["body"] = body if body_type is not unset: kwargs["body_type"] = body_type + if call_type is not unset: + kwargs["call_type"] = call_type if certificate is not unset: kwargs["certificate"] = certificate if certificate_domains is not unset: diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index 3c391c2e79..87d816ef56 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -164,7 +164,6 @@ from datadog_api_client.v1.model.http_log import HTTPLog from datadog_api_client.v1.model.http_log_error import HTTPLogError from datadog_api_client.v1.model.http_log_item import HTTPLogItem -from datadog_api_client.v1.model.http_method import HTTPMethod from datadog_api_client.v1.model.heat_map_widget_definition import HeatMapWidgetDefinition from datadog_api_client.v1.model.heat_map_widget_definition_type import HeatMapWidgetDefinitionType from datadog_api_client.v1.model.heat_map_widget_request import HeatMapWidgetRequest @@ -645,6 +644,7 @@ from datadog_api_client.v1.model.synthetics_step_detail import SyntheticsStepDetail from datadog_api_client.v1.model.synthetics_step_detail_warning import SyntheticsStepDetailWarning from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType +from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType from datadog_api_client.v1.model.synthetics_test_ci_options import SyntheticsTestCiOptions from datadog_api_client.v1.model.synthetics_test_config import SyntheticsTestConfig from datadog_api_client.v1.model.synthetics_test_details import SyntheticsTestDetails diff --git a/tests/v1/features/synthetics.feature b/tests/v1/features/synthetics.feature index bb48045678..21b4c3a2c0 100644 --- a/tests/v1/features/synthetics.feature +++ b/tests/v1/features/synthetics.feature @@ -34,7 +34,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-app Scenario: Create a browser test returns "- JSON format is wrong" response Given new "CreateSyntheticsBrowserTest" request - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "method": "GET", "proxy": {"url": "https://example.com"}, "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -59,7 +59,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-app Scenario: Create a browser test returns "Test quota is reached" response Given new "CreateSyntheticsBrowserTest" request - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "method": "GET", "proxy": {"url": "https://example.com"}, "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 402 Test quota is reached @@ -241,7 +241,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "- JSON format is wrong" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "method": "GET", "proxy": {"url": "https://example.com"}, "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -249,7 +249,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "- Synthetic Monitoring is not activated for the user" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "method": "GET", "proxy": {"url": "https://example.com"}, "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 404 - Synthetic Monitoring is not activated for the user @@ -257,7 +257,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "OK" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "method": "GET", "proxy": {"url": "https://example.com"}, "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} When the request is sent Then the response status is 200 OK