From 49943db9f088e31818b04b43a911ca1a77d110f1 Mon Sep 17 00:00:00 2001 From: corentin Date: Thu, 14 Nov 2024 11:12:50 +0100 Subject: [PATCH] Add new fields to tests --- ...cDatadogSyntheticsBrowserTest_Basic.freeze | 2 +- ...AccDatadogSyntheticsBrowserTest_Basic.yaml | 42 +++++++++---------- .../resource_datadog_synthetics_test_test.go | 6 +++ 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.freeze b/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.freeze index ecfbc0ef6..6d4a9b01f 100644 --- a/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.freeze +++ b/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.freeze @@ -1 +1 @@ -2024-11-14T10:34:33.356614+01:00 \ No newline at end of file +2024-11-14T11:11:48.350162+01:00 \ No newline at end of file diff --git a/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.yaml b/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.yaml index 202ae6f75..9832d18f0 100644 --- a/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.yaml +++ b/datadog/tests/cassettes/TestAccDatadogSyntheticsBrowserTest_Basic.yaml @@ -6,14 +6,14 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1770 + content_length: 1768 transfer_encoding: [] trailer: {} host: api.datadoghq.com remote_addr: "" request_uri: "" body: | - {"config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"example":"secret","name":"MY_SECRET","pattern":"secret","secure":true,"type":"text"}]},"locations":["aws:eu-central-1"],"message":"Notify @datadog.user","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873-monitor","monitor_options":{"renotify_interval":120},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"status":"paused","steps":[{"allowFailure":true,"alwaysExecute":false,"exitIfSucceed":false,"isCritical":true,"name":"first step","noScreenshot":true,"params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl"}],"tags":["foo:bar","baz"],"type":"browser"} + {"config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"example":"secret","name":"MY_SECRET","pattern":"secret","secure":true,"type":"text"}]},"locations":["aws:eu-central-1"],"message":"Notify @datadog.user","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108-monitor","monitor_options":{"renotify_interval":120},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"status":"paused","steps":[{"allowFailure":true,"alwaysExecute":true,"exitIfSucceed":true,"isCritical":true,"name":"first step","noScreenshot":true,"params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl"}],"tags":["foo:bar","baz"],"type":"browser"} form: {} headers: Accept: @@ -32,13 +32,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"i2s-nue-czt","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T09:34:35.353581+00:00","modified_at":"2024-11-14T09:34:35.353581+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":158213223,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"steps":[{"name":"first step","params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl","public_id":"yxe-awz-hxx","allowFailure":true,"isCritical":true,"noScreenshot":true,"exitIfSucceed":false,"alwaysExecute":false}],"stepCount":{"assertions":1,"subtests":0,"total":1}} + {"public_id":"tvw-wnc-g96","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T10:11:52.864208+00:00","modified_at":"2024-11-14T10:11:52.864208+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":158215401,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"steps":[{"name":"first step","params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl","public_id":"n3c-7qd-f53","allowFailure":true,"isCritical":true,"noScreenshot":true,"exitIfSucceed":true,"alwaysExecute":true}],"stepCount":{"assertions":1,"subtests":0,"total":1}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 470.124833ms + duration: 861.89625ms - id: 1 request: proto: HTTP/1.1 @@ -55,7 +55,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/browser/i2s-nue-czt + url: https://api.datadoghq.com/api/v1/synthetics/tests/browser/tvw-wnc-g96 method: GET response: proto: HTTP/1.1 @@ -67,13 +67,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"i2s-nue-czt","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T09:34:35.353581+00:00","modified_at":"2024-11-14T09:34:35.353581+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158213223,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"steps":[{"name":"first step","params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl","public_id":"yxe-awz-hxx","allowFailure":true,"isCritical":true,"noScreenshot":true,"exitIfSucceed":false,"alwaysExecute":false}]} + {"public_id":"tvw-wnc-g96","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T10:11:52.864208+00:00","modified_at":"2024-11-14T10:11:52.864208+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158215401,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"steps":[{"name":"first step","params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl","public_id":"n3c-7qd-f53","allowFailure":true,"isCritical":true,"noScreenshot":true,"exitIfSucceed":true,"alwaysExecute":true}]} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 148.884333ms + duration: 171.853708ms - id: 2 request: proto: HTTP/1.1 @@ -90,7 +90,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/i2s-nue-czt + url: https://api.datadoghq.com/api/v1/synthetics/tests/tvw-wnc-g96 method: GET response: proto: HTTP/1.1 @@ -102,13 +102,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"i2s-nue-czt","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T09:34:35.353581+00:00","modified_at":"2024-11-14T09:34:35.353581+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158213223,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"tvw-wnc-g96","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T10:11:52.864208+00:00","modified_at":"2024-11-14T10:11:52.864208+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158215401,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 164.224042ms + duration: 160.888458ms - id: 3 request: proto: HTTP/1.1 @@ -125,7 +125,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/i2s-nue-czt + url: https://api.datadoghq.com/api/v1/synthetics/tests/tvw-wnc-g96 method: GET response: proto: HTTP/1.1 @@ -137,13 +137,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"i2s-nue-czt","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T09:34:35.353581+00:00","modified_at":"2024-11-14T09:34:35.353581+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158213223,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"tvw-wnc-g96","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T10:11:52.864208+00:00","modified_at":"2024-11-14T10:11:52.864208+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158215401,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 147.221834ms + duration: 171.982084ms - id: 4 request: proto: HTTP/1.1 @@ -160,7 +160,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/browser/i2s-nue-czt + url: https://api.datadoghq.com/api/v1/synthetics/tests/browser/tvw-wnc-g96 method: GET response: proto: HTTP/1.1 @@ -172,13 +172,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"i2s-nue-czt","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T09:34:35.353581+00:00","modified_at":"2024-11-14T09:34:35.353581+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731576873-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158213223,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"steps":[{"name":"first step","params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl","public_id":"yxe-awz-hxx","allowFailure":true,"isCritical":true,"noScreenshot":true,"exitIfSucceed":false,"alwaysExecute":false}]} + {"public_id":"tvw-wnc-g96","name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108","status":"paused","type":"browser","tags":["foo:bar","baz"],"created_at":"2024-11-14T10:11:52.864208+00:00","modified_at":"2024-11-14T10:11:52.864208+00:00","config":{"assertions":[],"configVariables":[{"example":"123","name":"VARIABLE_NAME","pattern":"{{numeric(3)}}","secure":false,"type":"text"}],"request":{"basicAuth":{"password":"password","type":"web","username":"username"},"certificateDomains":["https://datadoghq.com"],"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"method":"GET","proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"timeout":30,"url":"https://www.datadoghq.com"},"setCookie":"name=value","variables":[{"example":"597","name":"MY_PATTERN_VAR","pattern":"{{numeric(3)}}","secure":false,"type":"text"},{"example":"","name":"EMAIL_VAR","pattern":"","type":"email"},{"name":"MY_SECRET","secure":true,"type":"text"}]},"message":"Notify @datadog.user","options":{"ci":{"executionRule":"blocking"},"device_ids":["laptop_large","mobile_small"],"disableCors":true,"disableCsp":true,"httpVersion":"any","ignoreServerCertificateError":true,"initialNavigationTimeout":150,"min_location_failed":1,"monitor_name":"tf-TestAccDatadogSyntheticsBrowserTest_Basic-local-1731579108-monitor","monitor_options":{"renotify_interval":120,"on_missing_data":"show_no_data","notify_audit":false,"new_host_delay":300,"include_tags":true},"monitor_priority":5,"noScreenshot":true,"retry":{"count":2,"interval":300},"rumSettings":{"applicationId":"rum-app-id","clientTokenId":12345,"isEnabled":true},"tick_every":900},"locations":["aws:eu-central-1"],"monitor_id":158215401,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"steps":[{"name":"first step","params":{"check":"contains","value":"content"},"timeout":0,"type":"assertCurrentUrl","public_id":"n3c-7qd-f53","allowFailure":true,"isCritical":true,"noScreenshot":true,"exitIfSucceed":true,"alwaysExecute":true}]} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 154.377459ms + duration: 170.785917ms - id: 5 request: proto: HTTP/1.1 @@ -191,7 +191,7 @@ interactions: remote_addr: "" request_uri: "" body: | - {"public_ids":["i2s-nue-czt"]} + {"public_ids":["tvw-wnc-g96"]} form: {} headers: Accept: @@ -210,13 +210,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"deleted_tests":[{"public_id":"i2s-nue-czt","deleted_at":"2024-11-14T09:34:39.268634+00:00"}]} + {"deleted_tests":[{"public_id":"tvw-wnc-g96","deleted_at":"2024-11-14T10:11:55.598466+00:00"}]} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 875.977291ms + duration: 663.982542ms - id: 6 request: proto: HTTP/1.1 @@ -233,7 +233,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/i2s-nue-czt + url: https://api.datadoghq.com/api/v1/synthetics/tests/tvw-wnc-g96 method: GET response: proto: HTTP/1.1 @@ -250,4 +250,4 @@ interactions: - application/json status: 404 Not Found code: 404 - duration: 128.879292ms + duration: 134.862917ms diff --git a/datadog/tests/resource_datadog_synthetics_test_test.go b/datadog/tests/resource_datadog_synthetics_test_test.go index 4d56267c0..999edef02 100644 --- a/datadog/tests/resource_datadog_synthetics_test_test.go +++ b/datadog/tests/resource_datadog_synthetics_test_test.go @@ -3129,6 +3129,10 @@ func createSyntheticsBrowserTestStep(ctx context.Context, accProvider func() (*s "datadog_synthetics_test.bar", "browser_step.0.type", "assertCurrentUrl"), resource.TestCheckResourceAttr( "datadog_synthetics_test.bar", "browser_step.0.allow_failure", "true"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.bar", "browser_step.0.always_execute", "true"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.bar", "browser_step.0.exit_if_succeed", "true"), resource.TestCheckResourceAttr( "datadog_synthetics_test.bar", "browser_step.0.is_critical", "true"), resource.TestCheckResourceAttr( @@ -3246,6 +3250,8 @@ resource "datadog_synthetics_test" "bar" { name = "first step" type = "assertCurrentUrl" allow_failure = true + always_execute = true + exit_if_succeed = true is_critical = true params { check = "contains"