diff --git a/.apigentools-info b/.apigentools-info index 65b0f0b4785..4baec752fe0 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.5", - "regenerated": "2023-08-11 17:09:04.774339", - "spec_repo_commit": "0b6bfbed" + "regenerated": "2023-08-11 18:45:42.989487", + "spec_repo_commit": "54e2961f" }, "v2": { "apigentools_version": "1.6.5", - "regenerated": "2023-08-11 17:09:04.792492", - "spec_repo_commit": "0b6bfbed" + "regenerated": "2023-08-11 18:45:43.006040", + "spec_repo_commit": "54e2961f" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4f6d8c412a3..544f2c47815 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -14664,6 +14664,9 @@ components: maximum: 10 minimum: 0 type: integer + persistCookies: + description: Persist cookies across redirects. + type: boolean port: description: Port to use when performing the test. format: int64 diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java index 2a8d5d11444..132bc7b3e5a 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.java @@ -115,7 +115,8 @@ public static void main(String[] args) { .scope("yoyo") .tokenApiAuthentication( SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER) - .type(SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT))))) + .type(SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT))) + .persistCookies(true))) .locations(Collections.singletonList("aws:us-east-2")) .message("BDD test payload: synthetics_api_http_test_payload.json") .name("Example-Synthetic") diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java index b5ea1b33690..8cc33492ea2 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRequest.java @@ -38,6 +38,7 @@ SyntheticsTestRequest.JSON_PROPERTY_METHOD, SyntheticsTestRequest.JSON_PROPERTY_NO_SAVING_RESPONSE_BODY, SyntheticsTestRequest.JSON_PROPERTY_NUMBER_OF_PACKETS, + SyntheticsTestRequest.JSON_PROPERTY_PERSIST_COOKIES, SyntheticsTestRequest.JSON_PROPERTY_PORT, SyntheticsTestRequest.JSON_PROPERTY_PROXY, SyntheticsTestRequest.JSON_PROPERTY_QUERY, @@ -105,6 +106,9 @@ public class SyntheticsTestRequest { public static final String JSON_PROPERTY_NUMBER_OF_PACKETS = "numberOfPackets"; private Integer numberOfPackets; + public static final String JSON_PROPERTY_PERSIST_COOKIES = "persistCookies"; + private Boolean persistCookies; + public static final String JSON_PROPERTY_PORT = "port"; private Long port; @@ -545,6 +549,27 @@ public void setNumberOfPackets(Integer numberOfPackets) { this.numberOfPackets = numberOfPackets; } + public SyntheticsTestRequest persistCookies(Boolean persistCookies) { + this.persistCookies = persistCookies; + return this; + } + + /** + * Persist cookies across redirects. + * + * @return persistCookies + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSIST_COOKIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPersistCookies() { + return persistCookies; + } + + public void setPersistCookies(Boolean persistCookies) { + this.persistCookies = persistCookies; + } + public SyntheticsTestRequest port(Long port) { this.port = port; return this; @@ -791,6 +816,7 @@ public boolean equals(Object o) { && Objects.equals(this.method, syntheticsTestRequest.method) && Objects.equals(this.noSavingResponseBody, syntheticsTestRequest.noSavingResponseBody) && Objects.equals(this.numberOfPackets, syntheticsTestRequest.numberOfPackets) + && Objects.equals(this.persistCookies, syntheticsTestRequest.persistCookies) && Objects.equals(this.port, syntheticsTestRequest.port) && Objects.equals(this.proxy, syntheticsTestRequest.proxy) && Objects.equals(this.query, syntheticsTestRequest.query) @@ -823,6 +849,7 @@ public int hashCode() { method, noSavingResponseBody, numberOfPackets, + persistCookies, port, proxy, query, @@ -860,6 +887,7 @@ public String toString() { .append(toIndentedString(noSavingResponseBody)) .append("\n"); sb.append(" numberOfPackets: ").append(toIndentedString(numberOfPackets)).append("\n"); + sb.append(" persistCookies: ").append(toIndentedString(persistCookies)).append("\n"); sb.append(" port: ").append(toIndentedString(port)).append("\n"); sb.append(" proxy: ").append(toIndentedString(proxy)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); diff --git a/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.freeze b/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.freeze index d27a94e6248..9268a5d136a 100644 --- a/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.freeze +++ b/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.freeze @@ -1 +1 @@ -2023-01-11T22:23:00.967Z \ No newline at end of file +2023-08-11T15:25:10.265Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.json b/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.json index 4f43cf464e8..5f09c9bb1f6 100644 --- a/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.json +++ b/src/test/resources/cassettes/features/v1/Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1673475780\"},\"method\":\"GET\",\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"status\":\"live\",\"public_id\":\"v95-t96-e52\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"deleted_at\":null,\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780\",\"monitor_id\":107572226,\"type\":\"api\",\"created_at\":\"2023-01-11T22:23:01.221860+00:00\",\"modified_at\":\"2023-01-11T22:23:01.221860+00:00\",\"subtype\":\"http\",\"config\":{\"request\":{\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"url\":\"https://datadoghq.com\",\"basicAuth\":{\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"scope\":\"yoyo\",\"type\":\"oauth-client\",\"tokenApiAuthentication\":\"header\"},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1673475780\"},\"proxy\":{\"url\":\"https://datadoghq.com\",\"headers\":{}},\"timeout\":10,\"method\":\"GET\"},\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"type\":\"header\",\"target\":\"text/html\"},{\"operator\":\"lessThan\",\"type\":\"responseTime\",\"target\":2000},{\"operator\":\"validatesJSONPath\",\"type\":\"body\",\"target\":{\"operator\":\"isNot\",\"targetValue\":\"0\",\"jsonPath\":\"topKey\"}},{\"operator\":\"validatesXPath\",\"type\":\"body\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"}}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":10},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780\",\"tick_every\":60,\"httpVersion\":\"http2\"}}", + "body": "{\"public_id\":\"p5t-6vv-3xj\",\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-08-11T15:25:10.474768+00:00\",\"modified_at\":\"2023-08-11T15:25:10.474768+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":128997418,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "babbe6bf-a82c-0a8b-d8bc-34d385c9ec07" + "id": "1fdc9975-447f-f41d-6d73-f0f1b22d5624" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"public_ids\":[\"v95-t96-e52\"]}" + "json": "{\"public_ids\":[\"p5t-6vv-3xj\"]}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"deleted_tests\":[{\"deleted_at\":\"2023-01-11T22:23:01.652785+00:00\",\"public_id\":\"v95-t96-e52\"}]}\n", + "body": "{\"deleted_tests\":[{\"public_id\":\"p5t-6vv-3xj\",\"deleted_at\":\"2023-08-11T15:25:10.679107+00:00\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "227b77a7-aed6-9858-747f-1f7eabb5629f" + "id": "c8cbc8b1-1c92-7cd5-0f9e-c0ffc04fcc70" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.freeze index fa2ad4b7082..68bcd3834bc 100644 --- a/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.freeze @@ -1 +1 @@ -2023-01-11T22:27:11.207Z \ No newline at end of file +2023-08-11T15:25:10.775Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.json index 541b70d8941..00b9758501d 100644 --- a/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Edit_an_API_test_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1673476031\"},\"method\":\"GET\",\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Edit_an_API_test_returns_OK_response-1673476031\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Edit_an_API_test_returns_OK_response-1673476031\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1691767510\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Edit_an_API_test_returns_OK_response-1691767510\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Edit_an_API_test_returns_OK_response-1691767510\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"status\":\"live\",\"public_id\":\"e9j-ihg-ib3\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"deleted_at\":null,\"name\":\"Test-Edit_an_API_test_returns_OK_response-1673476031\",\"monitor_id\":107572463,\"type\":\"api\",\"created_at\":\"2023-01-11T22:27:11.422320+00:00\",\"modified_at\":\"2023-01-11T22:27:11.422320+00:00\",\"subtype\":\"http\",\"config\":{\"request\":{\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"url\":\"https://datadoghq.com\",\"basicAuth\":{\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"scope\":\"yoyo\",\"type\":\"oauth-client\",\"tokenApiAuthentication\":\"header\"},\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1673476031\"},\"proxy\":{\"url\":\"https://datadoghq.com\",\"headers\":{}},\"timeout\":10,\"method\":\"GET\"},\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"type\":\"header\",\"target\":\"text/html\"},{\"operator\":\"lessThan\",\"type\":\"responseTime\",\"target\":2000},{\"operator\":\"validatesJSONPath\",\"type\":\"body\",\"target\":{\"operator\":\"isNot\",\"targetValue\":\"0\",\"jsonPath\":\"topKey\"}},{\"operator\":\"validatesXPath\",\"type\":\"body\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"}}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":10},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Edit_an_API_test_returns_OK_response-1673476031\",\"tick_every\":60,\"httpVersion\":\"http2\"}}", + "body": "{\"public_id\":\"z5e-ur4-nh7\",\"name\":\"Test-Edit_an_API_test_returns_OK_response-1691767510\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-08-11T15:25:11.022092+00:00\",\"modified_at\":\"2023-08-11T15:25:11.022092+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1691767510\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Edit_an_API_test_returns_OK_response-1691767510\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":128997423,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}", "headers": { "Content-Type": [ "application/json" @@ -27,22 +27,22 @@ "timeToLive": { "unlimited": true }, - "id": "22ba553a-3598-1252-a0e8-cc7144740005" + "id": "39cacd02-eb2a-8205-d575-d4f3efe5e6da" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1673476031\"},\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_payload.json\",\"name\":\"Test-Edit_an_API_test_returns_OK_response-1673476031-updated\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-TestSyntheticsAPITestLifecycle-1623076664\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"status\":\"live\",\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1691767510\"},\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_payload.json\",\"name\":\"Test-Edit_an_API_test_returns_OK_response-1691767510-updated\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-TestSyntheticsAPITestLifecycle-1623076664\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"status\":\"live\",\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "headers": {}, "method": "PUT", - "path": "/api/v1/synthetics/tests/api/e9j-ihg-ib3", + "path": "/api/v1/synthetics/tests/api/z5e-ur4-nh7", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"status\":\"live\",\"public_id\":\"e9j-ihg-ib3\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_payload.json\",\"deleted_at\":null,\"name\":\"Test-Edit_an_API_test_returns_OK_response-1673476031-updated\",\"monitor_id\":107572463,\"type\":\"api\",\"created_at\":\"2023-01-11T22:27:11.422320+00:00\",\"modified_at\":\"2023-01-11T22:27:11.678286+00:00\",\"subtype\":\"http\",\"config\":{\"request\":{\"url\":\"https://datadoghq.com\",\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1673476031\"},\"certificate\":{\"cert\":{\"updatedAt\":\"2020-10-16T09:23:24.857Z\",\"filename\":\"cert-filename\"},\"key\":{\"updatedAt\":\"2020-10-16T09:23:24.857Z\",\"filename\":\"key-filename\"}},\"method\":\"GET\",\"timeout\":10},\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"type\":\"header\",\"target\":\"text/html\"},{\"operator\":\"lessThan\",\"type\":\"responseTime\",\"target\":2000},{\"operator\":\"validatesJSONPath\",\"type\":\"body\",\"target\":{\"operator\":\"isNot\",\"targetValue\":\"0\",\"jsonPath\":\"topKey\"}}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":10},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-TestSyntheticsAPITestLifecycle-1623076664\",\"tick_every\":60}}", + "body": "{\"public_id\":\"z5e-ur4-nh7\",\"name\":\"Test-Edit_an_API_test_returns_OK_response-1691767510-updated\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-08-11T15:25:11.022092+00:00\",\"modified_at\":\"2023-08-11T15:25:11.302824+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificate\":{\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testeditanapitestreturnsokresponse1691767510\"},\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-TestSyntheticsAPITestLifecycle-1623076664\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":128997423,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "8c53afff-2d7c-0d95-c2f9-3042ede3ef5a" + "id": "e95e09d8-5a64-5e6f-139b-381f9e1d228e" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"public_ids\":[\"e9j-ihg-ib3\"]}" + "json": "{\"public_ids\":[\"z5e-ur4-nh7\"]}" }, "headers": {}, "method": "POST", @@ -72,7 +72,7 @@ "secure": true }, "httpResponse": { - "body": "{\"deleted_tests\":[{\"deleted_at\":\"2023-01-11T22:27:11.896795+00:00\",\"public_id\":\"e9j-ihg-ib3\"}]}\n", + "body": "{\"deleted_tests\":[{\"public_id\":\"z5e-ur4-nh7\",\"deleted_at\":\"2023-08-11T15:25:12.475026+00:00\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -87,6 +87,6 @@ "timeToLive": { "unlimited": true }, - "id": "a6c2652d-50da-79e4-a070-ad696ba44183" + "id": "f06d4a61-f35d-3ba6-09c2-52e4cdc4bcc5" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.freeze b/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.freeze index 47cccbf36a3..a0de65aaef5 100644 --- a/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.freeze +++ b/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.freeze @@ -1 +1 @@ -2023-01-11T22:27:09.960Z \ No newline at end of file +2023-08-11T15:25:09.392Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.json b/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.json index f8bdc7550b4..ce38c5ea3f7 100644 --- a/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.json +++ b/src/test/resources/cassettes/features/v1/Get_a_synthetics_monitor_s_details.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testgetasyntheticsmonitorsdetails1673476029\"},\"method\":\"GET\",\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Get_a_synthetics_monitor_s_details-1673476029\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Get_a_synthetics_monitor_s_details-1673476029\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testgetasyntheticsmonitorsdetails1691767509\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Get_a_synthetics_monitor_s_details-1691767509\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Get_a_synthetics_monitor_s_details-1691767509\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"status\":\"live\",\"public_id\":\"bij-9tv-kg3\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"deleted_at\":null,\"name\":\"Test-Get_a_synthetics_monitor_s_details-1673476029\",\"monitor_id\":107572460,\"type\":\"api\",\"created_at\":\"2023-01-11T22:27:10.318316+00:00\",\"modified_at\":\"2023-01-11T22:27:10.318316+00:00\",\"subtype\":\"http\",\"config\":{\"request\":{\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"url\":\"https://datadoghq.com\",\"basicAuth\":{\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"scope\":\"yoyo\",\"type\":\"oauth-client\",\"tokenApiAuthentication\":\"header\"},\"headers\":{\"unique\":\"testgetasyntheticsmonitorsdetails1673476029\"},\"proxy\":{\"url\":\"https://datadoghq.com\",\"headers\":{}},\"timeout\":10,\"method\":\"GET\"},\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"type\":\"header\",\"target\":\"text/html\"},{\"operator\":\"lessThan\",\"type\":\"responseTime\",\"target\":2000},{\"operator\":\"validatesJSONPath\",\"type\":\"body\",\"target\":{\"operator\":\"isNot\",\"targetValue\":\"0\",\"jsonPath\":\"topKey\"}},{\"operator\":\"validatesXPath\",\"type\":\"body\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"}}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":10},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Get_a_synthetics_monitor_s_details-1673476029\",\"tick_every\":60,\"httpVersion\":\"http2\"}}", + "body": "{\"public_id\":\"6w4-5d4-j7y\",\"name\":\"Test-Get_a_synthetics_monitor_s_details-1691767509\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-08-11T15:25:09.641255+00:00\",\"modified_at\":\"2023-08-11T15:25:09.641255+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testgetasyntheticsmonitorsdetails1691767509\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Get_a_synthetics_monitor_s_details-1691767509\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":128997413,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}", "headers": { "Content-Type": [ "application/json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "9bb94ad5-dcf8-dde2-0b92-c4664ff8bebe" + "id": "99a6af22-3fd7-4e27-8f7c-b2b0a0d7b48f" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v1/monitor/107572460", + "path": "/api/v1/monitor/128997413", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"id\":107572460,\"org_id\":321813,\"type\":\"synthetics alert\",\"name\":\"Test-Get_a_synthetics_monitor_s_details-1673476029\",\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"tags\":[\"testing:api\",\"probe_dc:aws:us-east-2\",\"check_type:api\",\"check_status:live\",\"ci_execution_rule:blocking\"],\"query\":\"no_query\",\"options\":{\"include_tags\":true,\"notify_audit\":false,\"new_host_delay\":300,\"on_missing_data\":\"show_no_data\",\"synthetics_check_id\":\"bij-9tv-kg3\",\"silenced\":{}},\"multi\":false,\"created_at\":1673476030000,\"created\":\"2023-01-11T22:27:10.299804+00:00\",\"modified\":\"2023-01-11T22:27:10.299804+00:00\",\"deleted\":null,\"restricted_roles\":null,\"priority\":5,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"id\":1445416}}\n", + "body": "{\"id\":128997413,\"org_id\":321813,\"type\":\"synthetics alert\",\"name\":\"Test-Get_a_synthetics_monitor_s_details-1691767509\",\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"tags\":[\"testing:api\",\"probe_dc:aws:us-east-2\",\"check_type:api\",\"check_status:live\",\"ci_execution_rule:blocking\"],\"query\":\"no_query\",\"options\":{\"on_missing_data\":\"show_no_data\",\"notify_audit\":false,\"new_host_delay\":300,\"include_tags\":true,\"synthetics_check_id\":\"6w4-5d4-j7y\",\"silenced\":{}},\"multi\":false,\"created_at\":1691767509000,\"created\":\"2023-08-11T15:25:09.617676+00:00\",\"modified\":\"2023-08-11T15:25:09.617676+00:00\",\"deleted\":null,\"restricted_roles\":null,\"priority\":5,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"id\":1445416}}\n", "headers": { "Content-Type": [ "application/json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "c42b4342-9540-ca78-58fb-f6a21fa51cf4" + "id": "f3724341-d254-e4c8-2b74-f2da52434040" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"public_ids\":[\"bij-9tv-kg3\"]}" + "json": "{\"public_ids\":[\"6w4-5d4-j7y\"]}" }, "headers": {}, "method": "POST", @@ -68,7 +68,7 @@ "secure": true }, "httpResponse": { - "body": "{\"deleted_tests\":[{\"deleted_at\":\"2023-01-11T22:27:10.992952+00:00\",\"public_id\":\"bij-9tv-kg3\"}]}\n", + "body": "{\"deleted_tests\":[{\"public_id\":\"6w4-5d4-j7y\",\"deleted_at\":\"2023-08-11T15:25:09.982551+00:00\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -83,6 +83,6 @@ "timeToLive": { "unlimited": true }, - "id": "08201348-03c2-53ee-c4f8-0aec48e508cd" + "id": "609c811d-b402-a7ef-95fd-5124a55a1f4e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.freeze index ef286925acd..0a3893e58e6 100644 --- a/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.freeze @@ -1 +1 @@ -2023-05-15T21:08:02.110Z \ No newline at end of file +2023-08-11T15:25:12.587Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.json index e4c8016d911..1eaaab80b7d 100644 --- a/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Trigger_Synthetic_tests_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testtriggersynthetictestsreturnsokresponse1684184882\"},\"method\":\"GET\",\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1684184882\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1684184882\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testtriggersynthetictestsreturnsokresponse1691767512\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1691767512\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1691767512\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"public_id\":\"dvu-y6u-viu\",\"name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1684184882\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-05-15T21:08:02.660549+00:00\",\"modified_at\":\"2023-05-15T21:08:02.660549+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testtriggersynthetictestsreturnsokresponse1684184882\"},\"method\":\"GET\",\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1684184882\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"deleted_at\":null,\"monitor_id\":119119692,\"org_id\":321813}", + "body": "{\"public_id\":\"bqg-36t-cy2\",\"name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1691767512\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-08-11T15:25:12.805531+00:00\",\"modified_at\":\"2023-08-11T15:25:12.805531+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testtriggersynthetictestsreturnsokresponse1691767512\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Trigger_Synthetic_tests_returns_OK_response-1691767512\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":128997443,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "6dbd28d8-0cb7-4187-1821-ccec5cfdebd2" + "id": "fba09048-e3b8-46f3-553f-911e8ca6b5b3" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"tests\":[{\"public_id\":\"dvu-y6u-viu\"}]}" + "json": "{\"tests\":[{\"public_id\":\"bqg-36t-cy2\"}]}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"triggered_check_ids\":[\"dvu-y6u-viu\"],\"results\":[{\"public_id\":\"dvu-y6u-viu\",\"location\":30005,\"result_id\":\"1580410764067086498\"}],\"locations\":[{\"id\":30005,\"name\":\"aws:us-east-2\",\"display_name\":\"Ohio (AWS)\",\"region\":\"Americas\",\"is_active\":true,\"is_public\":true,\"metadata\":null}],\"batch_id\":null}\n", + "body": "{\"triggered_check_ids\":[\"bqg-36t-cy2\"],\"results\":[{\"public_id\":\"bqg-36t-cy2\",\"location\":30005,\"result_id\":\"2121674931074096424\"}],\"locations\":[{\"id\":30005,\"name\":\"aws:us-east-2\",\"display_name\":\"Ohio (AWS)\",\"region\":\"Americas\",\"is_active\":true,\"is_public\":true,\"metadata\":null}],\"batch_id\":null}\n", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "4622c789-e6b5-4b7f-558b-a4e2424ac92b" + "id": "8b629f50-141c-31b1-264f-caafcba67e1c" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"public_ids\":[\"dvu-y6u-viu\"]}" + "json": "{\"public_ids\":[\"bqg-36t-cy2\"]}" }, "headers": {}, "method": "POST", @@ -72,7 +72,7 @@ "secure": true }, "httpResponse": { - "body": "{\"deleted_tests\":[{\"public_id\":\"dvu-y6u-viu\",\"deleted_at\":\"2023-05-15T21:08:03.802788+00:00\"}]}\n", + "body": "{\"deleted_tests\":[{\"public_id\":\"bqg-36t-cy2\",\"deleted_at\":\"2023-08-11T15:25:14.357520+00:00\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -87,6 +87,6 @@ "timeToLive": { "unlimited": true }, - "id": "03457558-451a-f62f-9333-3554fbf1efa9" + "id": "63b25d87-e7fb-6f05-710d-5f57fe79df27" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v1/api/given.json b/src/test/resources/com/datadog/api/client/v1/api/given.json index 9f31677b0aa..2f0b4c3db60 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/given.json +++ b/src/test/resources/com/datadog/api/client/v1/api/given.json @@ -199,7 +199,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n { \"operator\": \"lessThan\", \"target\": 2000, \"type\": \"responseTime\" },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n }\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" + "value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n { \"operator\": \"lessThan\", \"target\": 2000, \"type\": \"responseTime\" },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n },\n \"persistCookies\": true\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" } ], "step": "there is a valid \"synthetics_api_test\" in the system", diff --git a/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_http_test_payload.json b/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_http_test_payload.json index b752d0a5ac6..60627f7ea4c 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_http_test_payload.json +++ b/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_http_test_payload.json @@ -65,7 +65,8 @@ "scope": "yoyo", "tokenApiAuthentication": "header", "type": "oauth-client" - } + }, + "persistCookies": true } }, "locations": ["aws:us-east-2"],