diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 455b80b93a..b41f414fd3 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -20355,6 +20355,10 @@ components: ignoreServerCertificateError: description: Ignore server certificate error for browser tests. type: boolean + ignore_certificate_validation: + description: |- + For SSL tests, whether or not the test should ignore certificate validation. + type: boolean initialNavigationTimeout: description: Timeout before declaring the initial step as failed (in seconds) for browser tests. format: int64 diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.py b/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.py index a92d2aa01a..a2298835be 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.py +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.py @@ -37,6 +37,7 @@ accept_self_signed=True, check_certificate_revocation=True, disable_aia_intermediate_fetching=True, + ignore_certificate_validation=True, tick_every=60, ), subtype=SyntheticsTestDetailsSubType.SSL, diff --git a/src/datadog_api_client/v1/model/synthetics_test_options.py b/src/datadog_api_client/v1/model/synthetics_test_options.py index 77476c26fd..b18fcfd93e 100644 --- a/src/datadog_api_client/v1/model/synthetics_test_options.py +++ b/src/datadog_api_client/v1/model/synthetics_test_options.py @@ -63,6 +63,7 @@ def openapi_types(_): "follow_redirects": (bool,), "http_version": (SyntheticsTestOptionsHTTPVersion,), "ignore_server_certificate_error": (bool,), + "ignore_certificate_validation": (bool,), "initial_navigation_timeout": (int,), "min_failure_duration": (int,), "min_location_failed": (int,), @@ -93,6 +94,7 @@ def openapi_types(_): "follow_redirects": "follow_redirects", "http_version": "httpVersion", "ignore_server_certificate_error": "ignoreServerCertificateError", + "ignore_certificate_validation": "ignore_certificate_validation", "initial_navigation_timeout": "initialNavigationTimeout", "min_failure_duration": "min_failure_duration", "min_location_failed": "min_location_failed", @@ -124,6 +126,7 @@ def __init__( follow_redirects: Union[bool, UnsetType] = unset, http_version: Union[SyntheticsTestOptionsHTTPVersion, UnsetType] = unset, ignore_server_certificate_error: Union[bool, UnsetType] = unset, + ignore_certificate_validation: Union[bool, UnsetType] = unset, initial_navigation_timeout: Union[int, UnsetType] = unset, min_failure_duration: Union[int, UnsetType] = unset, min_location_failed: Union[int, UnsetType] = unset, @@ -187,6 +190,9 @@ def __init__( :param ignore_server_certificate_error: Ignore server certificate error for browser tests. :type ignore_server_certificate_error: bool, optional + :param ignore_certificate_validation: For SSL tests, whether or not the test should ignore certificate validation. + :type ignore_certificate_validation: bool, optional + :param initial_navigation_timeout: Timeout before declaring the initial step as failed (in seconds) for browser tests. :type initial_navigation_timeout: int, optional @@ -265,6 +271,8 @@ def __init__( kwargs["http_version"] = http_version if ignore_server_certificate_error is not unset: kwargs["ignore_server_certificate_error"] = ignore_server_certificate_error + if ignore_certificate_validation is not unset: + kwargs["ignore_certificate_validation"] = ignore_certificate_validation if initial_navigation_timeout is not unset: kwargs["initial_navigation_timeout"] = initial_navigation_timeout if min_failure_duration is not unset: diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.frozen index d440d9ecec..088b3deb8e 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.frozen @@ -1 +1 @@ -2025-07-11T17:23:57.607Z \ No newline at end of file +2026-07-10T09:46:57.309Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.yaml index 7bffa778c2..e78ecdbffe 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_an_api_ssl_test_returns_ok_returns_the_created_test_details_response.yaml @@ -2,7 +2,7 @@ interactions: - request: body: '{"config":{"assertions":[{"operator":"isInMoreThan","target":10,"type":"certificate"}],"request":{"host":"datadoghq.com","port":"{{ DATADOG_PORT }}"}},"locations":["aws:us-east-2"],"message":"BDD test payload: - synthetics_api_ssl_test_payload.json","name":"Test-Create_an_API_SSL_test_returns_OK_Returns_the_created_test_details_response-1752254637","options":{"accept_self_signed":true,"checkCertificateRevocation":true,"disableAiaIntermediateFetching":true,"tick_every":60},"subtype":"ssl","tags":["testing:api"],"type":"api"}' + synthetics_api_ssl_test_payload.json","name":"Test-Create_an_API_SSL_test_returns_OK_Returns_the_created_test_details_response-1783676817","options":{"accept_self_signed":true,"checkCertificateRevocation":true,"disableAiaIntermediateFetching":true,"ignore_certificate_validation":true,"tick_every":60},"subtype":"ssl","tags":["testing:api"],"type":"api"}' headers: accept: - application/json @@ -12,10 +12,10 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/api response: body: - string: '{"public_id":"ppr-ina-vd6","name":"Test-Create_an_API_SSL_test_returns_OK_Returns_the_created_test_details_response-1752254637","status":"live","type":"api","subtype":"ssl","tags":["testing:api"],"created_at":"2025-07-11T17:23:58.189592+00:00","modified_at":"2025-07-11T17:23:58.189592+00:00","config":{"assertions":[{"operator":"isInMoreThan","target":10,"type":"certificate"}],"request":{"host":"datadoghq.com","port":"{{ + string: '{"public_id":"qv3-9py-53q","name":"Test-Create_an_API_SSL_test_returns_OK_Returns_the_created_test_details_response-1783676817","status":"live","type":"api","subtype":"ssl","tags":["testing:api"],"created_at":"2026-07-10T09:46:58.299268+00:00","modified_at":"2026-07-10T09:46:58.299268+00:00","config":{"assertions":[{"operator":"isInMoreThan","target":10,"type":"certificate"}],"request":{"host":"datadoghq.com","port":"{{ DATADOG_PORT }}"},"configVariables":[{"id":"7865d47f-47df-43b5-a612-e2dea9ed40e8","name":"DATADOG_PORT","type":"global"}]},"message":"BDD - test payload: synthetics_api_ssl_test_payload.json","options":{"accept_self_signed":true,"checkCertificateRevocation":true,"disableAiaIntermediateFetching":true,"tick_every":60},"locations":["aws:us-east-2"],"created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"},"deleted_at":null,"monitor_id":177655296,"org_id":321813,"modified_by":{"name":"CI + test payload: synthetics_api_ssl_test_payload.json","options":{"accept_self_signed":true,"checkCertificateRevocation":true,"disableAiaIntermediateFetching":true,"ignore_certificate_validation":true,"tick_every":60,"bits_ai_auto_investigate":false},"locations":["aws:us-east-2"],"created_by":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"},"deleted_at":null,"monitor_id":304244708,"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: @@ -24,7 +24,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["ppr-ina-vd6"]}' + body: '{"public_ids":["qv3-9py-53q"]}' headers: accept: - application/json @@ -34,7 +34,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: body: - string: '{"deleted_tests":[{"public_id":"ppr-ina-vd6","deleted_at":"2025-07-11T17:23:59.574697+00:00"}]} + string: '{"deleted_tests":[{"public_id":"qv3-9py-53q","deleted_at":"2026-07-10T09:46:59.194132+00:00"}]} ' headers: diff --git a/tests/v1/features/synthetics.feature b/tests/v1/features/synthetics.feature index 052377a39d..911cc25517 100644 --- a/tests/v1/features/synthetics.feature +++ b/tests/v1/features/synthetics.feature @@ -246,6 +246,7 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK - Returns the created test details. And the response "name" is equal to "{{ unique }}" + And the response "options.ignore_certificate_validation" is equal to true @generated @skip @team:DataDog/synthetics-orchestrating-managing Scenario: Create an API test returns "- JSON format is wrong" response diff --git a/tests/v1/features/synthetics_api_ssl_test_payload.json b/tests/v1/features/synthetics_api_ssl_test_payload.json index 69aa27c347..6a731d3e1f 100644 --- a/tests/v1/features/synthetics_api_ssl_test_payload.json +++ b/tests/v1/features/synthetics_api_ssl_test_payload.json @@ -19,6 +19,7 @@ "accept_self_signed": true, "checkCertificateRevocation": true, "disableAiaIntermediateFetching": true, + "ignore_certificate_validation": true, "tick_every": 60 }, "subtype": "ssl",