diff --git a/.apigentools-info b/.apigentools-info index 331b871c419..48693e53e66 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-05-26 16:53:13.309161", - "spec_repo_commit": "fa84acd1" + "regenerated": "2023-05-26 17:55:31.638628", + "spec_repo_commit": "c4844513" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-05-26 16:53:13.324691", - "spec_repo_commit": "fa84acd1" + "regenerated": "2023-05-26 17:55:31.651767", + "spec_repo_commit": "c4844513" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index ee83aebc568..14fafe25bf1 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -13746,6 +13746,9 @@ components: type: string parser: $ref: '#/components/schemas/SyntheticsVariableParser' + secure: + description: Determines whether or not the extracted value will be obfuscated. + type: boolean type: $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptionsType' type: object diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java index 75edf708616..e7ecf9ed6ee 100644 --- a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java +++ b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java @@ -61,7 +61,8 @@ public static void main(String[] args) { .type(SyntheticsGlobalVariableParserType.RAW)) .type( SyntheticsGlobalVariableParseTestOptionsType - .HTTP_HEADER))) + .HTTP_HEADER) + .secure(true))) .isCritical(true) .name("request is sent") .request( diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java index 9ddb088098c..ab91d8658dc 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java @@ -17,6 +17,7 @@ SyntheticsParsingOptions.JSON_PROPERTY_FIELD, SyntheticsParsingOptions.JSON_PROPERTY_NAME, SyntheticsParsingOptions.JSON_PROPERTY_PARSER, + SyntheticsParsingOptions.JSON_PROPERTY_SECURE, SyntheticsParsingOptions.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( @@ -32,6 +33,9 @@ public class SyntheticsParsingOptions { public static final String JSON_PROPERTY_PARSER = "parser"; private SyntheticsVariableParser parser; + public static final String JSON_PROPERTY_SECURE = "secure"; + private Boolean secure; + public static final String JSON_PROPERTY_TYPE = "type"; private SyntheticsGlobalVariableParseTestOptionsType type; @@ -99,6 +103,27 @@ public void setParser(SyntheticsVariableParser parser) { this.parser = parser; } + public SyntheticsParsingOptions secure(Boolean secure) { + this.secure = secure; + return this; + } + + /** + * Determines whether or not the extracted value will be obfuscated. + * + * @return secure + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECURE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSecure() { + return secure; + } + + public void setSecure(Boolean secure) { + this.secure = secure; + } + public SyntheticsParsingOptions type(SyntheticsGlobalVariableParseTestOptionsType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -137,12 +162,13 @@ public boolean equals(Object o) { return Objects.equals(this.field, syntheticsParsingOptions.field) && Objects.equals(this.name, syntheticsParsingOptions.name) && Objects.equals(this.parser, syntheticsParsingOptions.parser) + && Objects.equals(this.secure, syntheticsParsingOptions.secure) && Objects.equals(this.type, syntheticsParsingOptions.type); } @Override public int hashCode() { - return Objects.hash(field, name, parser, type); + return Objects.hash(field, name, parser, secure, type); } @Override @@ -152,6 +178,7 @@ public String toString() { sb.append(" field: ").append(toIndentedString(field)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" parser: ").append(toIndentedString(parser)).append("\n"); + sb.append(" secure: ").append(toIndentedString(secure)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.freeze index 45ca3d6b438..8f9867d53d3 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.freeze @@ -1 +1 @@ -2023-01-05T15:20:23.898Z \ No newline at end of file +2023-05-23T13:41:47.597Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.json index 2bb5480e6bb..dc37321e404 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Create_a_global_variable_from_test_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "json": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"status\":\"live\",\"public_id\":\"prg-fny-su9\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"deleted_at\":null,\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"monitor_id\":106967129,\"type\":\"api\",\"created_at\":\"2023-01-05T15:20:24.483020+00:00\",\"modified_at\":\"2023-01-05T15:20:24.483020+00:00\",\"subtype\":\"multi\",\"config\":{\"steps\":[{\"retry\":{\"count\":5,\"interval\":1000},\"name\":\"request is sent\",\"request\":{\"url\":\"https://datadoghq.com\",\"method\":\"GET\",\"timeout\":10},\"subtype\":\"http\",\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"type\":\"statusCode\",\"target\":200}],\"isCritical\":true,\"id\":\"dg9-uxx-k65\",\"extractedValues\":[{\"field\":\"server\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\",\"name\":\"EXTRACTED_VALUE\"}]}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":1000},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1672932023\",\"tick_every\":60}}", + "body": "{\"public_id\":\"wk3-pn7-sn3\",\"name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-05-23T13:41:47.888352+00:00\",\"modified_at\":\"2023-05-23T13:41:47.888352+00:00\",\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\",\"id\":\"ymn-tzt-isn\"}]},\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_a_global_variable_from_test_returns_OK_response-1684849307\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"multi\",\"deleted_at\":null,\"monitor_id\":119820627,\"org_id\":321813}", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "b6972103-20a5-5a3f-00a7-bf7dca2eca0f" + "id": "cbd17627-b87f-5547-0cf1-27936d0758f1" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"description\":\"\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1672932023\",\"parse_test_options\":{\"localVariableName\":\"EXTRACTED_VALUE\",\"type\":\"local_variable\"},\"parse_test_public_id\":\"prg-fny-su9\",\"tags\":[],\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"secure\":false,\"value\":\"\"}}" + "json": "{\"description\":\"\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1684849307\",\"parse_test_options\":{\"localVariableName\":\"EXTRACTED_VALUE\",\"type\":\"local_variable\"},\"parse_test_public_id\":\"wk3-pn7-sn3\",\"tags\":[],\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"secure\":false,\"value\":\"\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"parse_test_options\":{\"type\":\"local_variable\",\"localVariableName\":\"EXTRACTED_VALUE\"},\"parse_test_extracted_at\":null,\"description\":\"\",\"tags\":[],\"last_error\":null,\"is_totp\":null,\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"value\":\"\",\"secure\":false},\"parse_test_public_id\":\"prg-fny-su9\",\"parse_test_name\":null,\"type\":\"variable\",\"id\":\"2dcbf35a-34a9-4254-8ddb-417593377a20\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1672932023\"}\n", + "body": "{\"id\":\"c1b94a97-87df-440f-b5fc-ef7f391bf07a\",\"name\":\"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1684849307\",\"description\":\"\",\"type\":\"variable\",\"tags\":[],\"parse_test_public_id\":\"wk3-pn7-sn3\",\"parse_test_name\":null,\"parse_test_options\":{\"localVariableName\":\"EXTRACTED_VALUE\",\"type\":\"local_variable\"},\"parse_test_extracted_at\":null,\"is_totp\":null,\"is_fido\":null,\"last_error\":null,\"value\":{\"options\":{\"totp_parameters\":{\"digits\":6,\"refresh_interval\":30}},\"secure\":false,\"value\":\"\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "5bd852f0-eb4a-8466-6852-2c57818d6cae" + "id": "29977d1c-e74c-e920-e2e1-ad849607b5da" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/synthetics/variables/2dcbf35a-34a9-4254-8ddb-417593377a20", + "path": "/api/v1/synthetics/variables/c1b94a97-87df-440f-b5fc-ef7f391bf07a", "keepAlive": false, "secure": true }, @@ -82,13 +82,13 @@ "timeToLive": { "unlimited": true }, - "id": "77bac210-3f49-b190-c6aa-ba294a726900" + "id": "5416ecd3-49a2-e141-2654-86b9d15b18d8" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"public_ids\":[\"prg-fny-su9\"]}" + "json": "{\"public_ids\":[\"wk3-pn7-sn3\"]}" }, "headers": {}, "method": "POST", @@ -97,7 +97,7 @@ "secure": true }, "httpResponse": { - "body": "{\"deleted_tests\":[{\"deleted_at\":\"2023-01-05T15:20:26.202732+00:00\",\"public_id\":\"prg-fny-su9\"}]}\n", + "body": "{\"deleted_tests\":[{\"public_id\":\"wk3-pn7-sn3\",\"deleted_at\":\"2023-05-23T13:41:48.789772+00:00\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -112,6 +112,6 @@ "timeToLive": { "unlimited": true }, - "id": "4e0eb2ab-081e-47b6-cc33-11509730e00f" + "id": "ba553cdf-9a87-0f96-50e1-f2a290951c95" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.freeze b/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.freeze index 08408b88997..63e087b31fb 100644 --- a/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.freeze +++ b/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.freeze @@ -1 +1 @@ -2022-08-30T12:59:30.516Z \ No newline at end of file +2023-05-22T14:08:52.406Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.json b/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.json index 43aadc3ef10..7c174e98f10 100644 --- a/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.json +++ b/src/test/resources/cassettes/features/v1/Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" + "json": "{\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\"}]},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"subtype\":\"multi\",\"tags\":[\"testing:api\"],\"type\":\"api\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"status\":\"live\",\"public_id\":\"mtz-ccy-e3x\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"deleted_at\":null,\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"monitor_id\":81568663,\"type\":\"api\",\"created_at\":\"2022-08-30T12:59:31.130267+00:00\",\"modified_at\":\"2022-08-30T12:59:31.130267+00:00\",\"subtype\":\"multi\",\"config\":{\"steps\":[{\"retry\":{\"count\":5,\"interval\":1000},\"name\":\"request is sent\",\"request\":{\"url\":\"https://datadoghq.com\",\"method\":\"GET\",\"timeout\":10},\"subtype\":\"http\",\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"type\":\"statusCode\",\"target\":200}],\"isCritical\":true,\"id\":\"vst-9t6-t7t\",\"extractedValues\":[{\"field\":\"server\",\"parser\":{\"type\":\"raw\"},\"type\":\"http_header\",\"name\":\"EXTRACTED_VALUE\"}]}],\"configVariables\":[{\"pattern\":\"content-type\",\"type\":\"text\",\"example\":\"content-type\",\"name\":\"PROPERTY\"}]},\"options\":{\"accept_self_signed\":false,\"retry\":{\"count\":3,\"interval\":1000},\"min_location_failed\":1,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"monitor_priority\":5,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1661864370\",\"tick_every\":60}}", + "body": "{\"public_id\":\"i52-inf-ua8\",\"name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-05-22T14:08:52.875670+00:00\",\"modified_at\":\"2023-05-22T14:08:52.875670+00:00\",\"config\":{\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"steps\":[{\"allowFailure\":true,\"assertions\":[{\"operator\":\"is\",\"target\":200,\"type\":\"statusCode\"}],\"extractedValues\":[{\"field\":\"server\",\"name\":\"EXTRACTED_VALUE\",\"parser\":{\"type\":\"raw\"},\"secure\":true,\"type\":\"http_header\"}],\"isCritical\":true,\"name\":\"request is sent\",\"request\":{\"method\":\"GET\",\"timeout\":10,\"url\":\"https://datadoghq.com\"},\"retry\":{\"count\":5,\"interval\":1000},\"subtype\":\"http\",\"id\":\"enf-w74-k4y\"}]},\"message\":\"BDD test payload: synthetics_api_test_multi_step_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_test_with_multi_subtype_returns_OK_Returns_the_created_test_details_response-1684764532\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":1000},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"multi\",\"deleted_at\":null,\"monitor_id\":119714203,\"org_id\":569509}", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "e533bc72-3b59-ee7a-98aa-f6ba29c84927" + "id": "a48b8c73-e651-efb2-9dc9-9260937085a9" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"public_ids\":[\"mtz-ccy-e3x\"]}" + "json": "{\"public_ids\":[\"i52-inf-ua8\"]}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"deleted_tests\":[{\"deleted_at\":\"2022-08-30T12:59:36.624525+00:00\",\"public_id\":\"mtz-ccy-e3x\"}]}", + "body": "{\"deleted_tests\":[{\"public_id\":\"i52-inf-ua8\",\"deleted_at\":\"2023-05-22T14:08:53.980399+00:00\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "49a77c60-9a86-a889-de5f-31472f457db9" + "id": "82f8da68-40c7-eeca-7181-0473b76e5cae" } ] \ 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 1c5be660728..21120d825e6 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 \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\"\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\"\n }\n ]\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 1000 },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" + "value": "{\n \"config\": {\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\",\n \"secure\": true\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\"\n }\n ]\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 1000 },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n" } ], "step": "there is a valid \"synthetics_api_test_multi_step\" in the system", diff --git a/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature b/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature index 64bd99da6c0..2eb8926ff49 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature @@ -202,6 +202,7 @@ Feature: Synthetics And the response "name" is equal to "{{ unique }}" And the response "config.steps[0].retry.count" is equal to 5 And the response "config.steps[0].retry.interval" is equal to 1000 + And the response "config.steps[0].extractedValues[0].secure" is equal to true @generated @skip @team:DataDog/synthetics-app Scenario: Delete a global variable returns "JSON format is wrong" response diff --git a/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_test_multi_step_payload.json b/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_test_multi_step_payload.json index 117f1b0b72d..f514958caa2 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_test_multi_step_payload.json +++ b/src/test/resources/com/datadog/api/client/v1/api/synthetics_api_test_multi_step_payload.json @@ -25,7 +25,8 @@ "parser": { "type": "raw" }, - "type": "http_header" + "type": "http_header", + "secure": true } ], "isCritical": true,