Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20037,6 +20037,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public static void main(String[] args) {
.acceptSelfSigned(true)
.checkCertificateRevocation(true)
.disableAiaIntermediateFetching(true)
.ignoreCertificateValidation(true)
.tickEvery(60L))
.subtype(SyntheticsTestDetailsSubType.SSL)
.tags(Collections.singletonList("testing:api"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
SyntheticsTestOptions.JSON_PROPERTY_FOLLOW_REDIRECTS,
SyntheticsTestOptions.JSON_PROPERTY_HTTP_VERSION,
SyntheticsTestOptions.JSON_PROPERTY_IGNORE_SERVER_CERTIFICATE_ERROR,
SyntheticsTestOptions.JSON_PROPERTY_IGNORE_CERTIFICATE_VALIDATION,
SyntheticsTestOptions.JSON_PROPERTY_INITIAL_NAVIGATION_TIMEOUT,
SyntheticsTestOptions.JSON_PROPERTY_MIN_FAILURE_DURATION,
SyntheticsTestOptions.JSON_PROPERTY_MIN_LOCATION_FAILED,
Expand Down Expand Up @@ -100,6 +101,10 @@ public class SyntheticsTestOptions {
"ignoreServerCertificateError";
private Boolean ignoreServerCertificateError;

public static final String JSON_PROPERTY_IGNORE_CERTIFICATE_VALIDATION =
"ignore_certificate_validation";
private Boolean ignoreCertificateValidation;

public static final String JSON_PROPERTY_INITIAL_NAVIGATION_TIMEOUT = "initialNavigationTimeout";
private Long initialNavigationTimeout;

Expand Down Expand Up @@ -478,6 +483,27 @@ public void setIgnoreServerCertificateError(Boolean ignoreServerCertificateError
this.ignoreServerCertificateError = ignoreServerCertificateError;
}

public SyntheticsTestOptions ignoreCertificateValidation(Boolean ignoreCertificateValidation) {
this.ignoreCertificateValidation = ignoreCertificateValidation;
return this;
}

/**
* For SSL tests, whether or not the test should ignore certificate validation.
*
* @return ignoreCertificateValidation
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IGNORE_CERTIFICATE_VALIDATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIgnoreCertificateValidation() {
return ignoreCertificateValidation;
}

public void setIgnoreCertificateValidation(Boolean ignoreCertificateValidation) {
this.ignoreCertificateValidation = ignoreCertificateValidation;
}

public SyntheticsTestOptions initialNavigationTimeout(Long initialNavigationTimeout) {
this.initialNavigationTimeout = initialNavigationTimeout;
return this;
Expand Down Expand Up @@ -832,6 +858,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.httpVersion, syntheticsTestOptions.httpVersion)
&& Objects.equals(
this.ignoreServerCertificateError, syntheticsTestOptions.ignoreServerCertificateError)
&& Objects.equals(
this.ignoreCertificateValidation, syntheticsTestOptions.ignoreCertificateValidation)
&& Objects.equals(
this.initialNavigationTimeout, syntheticsTestOptions.initialNavigationTimeout)
&& Objects.equals(this.minFailureDuration, syntheticsTestOptions.minFailureDuration)
Expand Down Expand Up @@ -866,6 +894,7 @@ public int hashCode() {
followRedirects,
httpVersion,
ignoreServerCertificateError,
ignoreCertificateValidation,
initialNavigationTimeout,
minFailureDuration,
minLocationFailed,
Expand Down Expand Up @@ -912,6 +941,9 @@ public String toString() {
sb.append(" ignoreServerCertificateError: ")
.append(toIndentedString(ignoreServerCertificateError))
.append("\n");
sb.append(" ignoreCertificateValidation: ")
.append(toIndentedString(ignoreCertificateValidation))
.append("\n");
sb.append(" initialNavigationTimeout: ")
.append(toIndentedString(initialNavigationTimeout))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"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\"}"
"json": "{\"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,\"ignore_certificate_validation\":true,\"tick_every\":60},\"subtype\":\"ssl\",\"tags\":[\"testing:api\"],\"type\":\"api\"}"
},
"headers": {},
"method": "POST",
Expand All @@ -27,7 +27,7 @@
"timeToLive": {
"unlimited": true
},
"id": "7971da29-5a6a-6613-4cc6-ed57d7d97ae6"
"id": "55175dd1-d74b-bc0c-02b5-1ceb01f924f9"
},
{
"httpRequest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"accept_self_signed": true,
"checkCertificateRevocation": true,
"disableAiaIntermediateFetching": true,
"ignore_certificate_validation": true,
"tick_every": 60
},
"subtype": "ssl",
Expand Down
Loading