diff --git a/.apigentools-info b/.apigentools-info index 40b619c3f93..27453a6fc73 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.2", - "regenerated": "2022-02-11 15:01:43.065174", - "spec_repo_commit": "0aeef32" + "regenerated": "2022-02-11 16:48:18.426818", + "spec_repo_commit": "f4d0a3f" }, "v2": { "apigentools_version": "1.6.2", - "regenerated": "2022-02-11 15:01:43.077011", - "spec_repo_commit": "0aeef32" + "regenerated": "2022-02-11 16:48:18.438678", + "spec_repo_commit": "f4d0a3f" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index cfef3390594..c1ffad5ed64 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -11527,6 +11527,10 @@ components: allowFailure: description: A boolean set to allow this step to fail. type: boolean + isCritical: + description: A boolean to use in addition to `allowFailure` to determine + if the test should be marked as failed when the step fails. + type: boolean name: description: The name of the step. type: string diff --git a/api/v1/datadog/docs/SyntheticsStep.md b/api/v1/datadog/docs/SyntheticsStep.md index 23839648eb0..8f453eea167 100644 --- a/api/v1/datadog/docs/SyntheticsStep.md +++ b/api/v1/datadog/docs/SyntheticsStep.md @@ -2,13 +2,14 @@ ## Properties -| Name | Type | Description | Notes | -| ---------------- | ---------------------------------------------------------- | ----------------------------------------- | ---------- | -| **AllowFailure** | Pointer to **bool** | A boolean set to allow this step to fail. | [optional] | -| **Name** | Pointer to **string** | The name of the step. | [optional] | -| **Params** | Pointer to **interface{}** | The parameters of the step. | [optional] | -| **Timeout** | Pointer to **int64** | The time before declaring a step failed. | [optional] | -| **Type** | Pointer to [**SyntheticsStepType**](SyntheticsStepType.md) | | [optional] | +| Name | Type | Description | Notes | +| ---------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **AllowFailure** | Pointer to **bool** | A boolean set to allow this step to fail. | [optional] | +| **IsCritical** | Pointer to **bool** | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails. | [optional] | +| **Name** | Pointer to **string** | The name of the step. | [optional] | +| **Params** | Pointer to **interface{}** | The parameters of the step. | [optional] | +| **Timeout** | Pointer to **int64** | The time before declaring a step failed. | [optional] | +| **Type** | Pointer to [**SyntheticsStepType**](SyntheticsStepType.md) | | [optional] | ## Methods @@ -54,6 +55,31 @@ SetAllowFailure sets AllowFailure field to given value. HasAllowFailure returns a boolean if a field has been set. +### GetIsCritical + +`func (o *SyntheticsStep) GetIsCritical() bool` + +GetIsCritical returns the IsCritical field if non-nil, zero value otherwise. + +### GetIsCriticalOk + +`func (o *SyntheticsStep) GetIsCriticalOk() (*bool, bool)` + +GetIsCriticalOk returns a tuple with the IsCritical field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsCritical + +`func (o *SyntheticsStep) SetIsCritical(v bool)` + +SetIsCritical sets IsCritical field to given value. + +### HasIsCritical + +`func (o *SyntheticsStep) HasIsCritical() bool` + +HasIsCritical returns a boolean if a field has been set. + ### GetName `func (o *SyntheticsStep) GetName() string` diff --git a/api/v1/datadog/model_synthetics_step.go b/api/v1/datadog/model_synthetics_step.go index 8543ce1a6f2..ff34996e2e9 100644 --- a/api/v1/datadog/model_synthetics_step.go +++ b/api/v1/datadog/model_synthetics_step.go @@ -16,6 +16,8 @@ import ( type SyntheticsStep struct { // A boolean set to allow this step to fail. AllowFailure *bool `json:"allowFailure,omitempty"` + // A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails. + IsCritical *bool `json:"isCritical,omitempty"` // The name of the step. Name *string `json:"name,omitempty"` // The parameters of the step. @@ -76,6 +78,38 @@ func (o *SyntheticsStep) SetAllowFailure(v bool) { o.AllowFailure = &v } +// GetIsCritical returns the IsCritical field value if set, zero value otherwise. +func (o *SyntheticsStep) GetIsCritical() bool { + if o == nil || o.IsCritical == nil { + var ret bool + return ret + } + return *o.IsCritical +} + +// GetIsCriticalOk returns a tuple with the IsCritical field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsStep) GetIsCriticalOk() (*bool, bool) { + if o == nil || o.IsCritical == nil { + return nil, false + } + return o.IsCritical, true +} + +// HasIsCritical returns a boolean if a field has been set. +func (o *SyntheticsStep) HasIsCritical() bool { + if o != nil && o.IsCritical != nil { + return true + } + + return false +} + +// SetIsCritical gets a reference to the given bool and assigns it to the IsCritical field. +func (o *SyntheticsStep) SetIsCritical(v bool) { + o.IsCritical = &v +} + // GetName returns the Name field value if set, zero value otherwise. func (o *SyntheticsStep) GetName() string { if o == nil || o.Name == nil { @@ -212,6 +246,9 @@ func (o SyntheticsStep) MarshalJSON() ([]byte, error) { if o.AllowFailure != nil { toSerialize["allowFailure"] = o.AllowFailure } + if o.IsCritical != nil { + toSerialize["isCritical"] = o.IsCritical + } if o.Name != nil { toSerialize["name"] = o.Name } @@ -231,6 +268,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { AllowFailure *bool `json:"allowFailure,omitempty"` + IsCritical *bool `json:"isCritical,omitempty"` Name *string `json:"name,omitempty"` Params *interface{} `json:"params,omitempty"` Timeout *int64 `json:"timeout,omitempty"` @@ -254,6 +292,7 @@ func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) { return nil } o.AllowFailure = all.AllowFailure + o.IsCritical = all.IsCritical o.Name = all.Name o.Params = all.Params o.Timeout = all.Timeout diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest.go b/examples/v1/synthetics/CreateSyntheticsBrowserTest.go index 13bacd46503..b8dc245ea00 100644 --- a/examples/v1/synthetics/CreateSyntheticsBrowserTest.go +++ b/examples/v1/synthetics/CreateSyntheticsBrowserTest.go @@ -55,6 +55,15 @@ func main() { "testing:browser", }, Type: datadog.SYNTHETICSBROWSERTESTTYPE_BROWSER, + Steps: &[]datadog.SyntheticsStep{ + { + AllowFailure: datadog.PtrBool(false), + IsCritical: datadog.PtrBool(true), + Name: datadog.PtrString("Refresh page"), + Params: &datadog.SyntheticsStepParams{}, + Type: datadog.SYNTHETICSSTEPTYPE_REFRESH.Ptr(), + }, + }, } ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.freeze index d82845b78ac..1397e06d8c0 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.freeze @@ -1 +1 @@ -2022-01-06T00:51:13.534Z \ No newline at end of file +2022-02-10T12:24:10.485Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.yaml index db2040525f5..622fde14161 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_browser_test_returns_OK_-_Returns_the_created_test_details._response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"config":{"assertions":[],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"method":"GET","url":"https://datadoghq.com"},"setCookie":"name:test"},"locations":["aws:us-east-2"],"message":"Test message","name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1641430273","options":{"accept_self_signed":false,"allow_insecure":true,"device_ids":["tablet"],"disableCors":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"noScreenshot":true,"retry":{"count":3,"interval":10},"tick_every":300},"tags":["testing:browser"],"type":"browser"} + {"config":{"assertions":[],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"method":"GET","url":"https://datadoghq.com"},"setCookie":"name:test"},"locations":["aws:us-east-2"],"message":"Test message","name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1644495850","options":{"accept_self_signed":false,"allow_insecure":true,"device_ids":["tablet"],"disableCors":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"noScreenshot":true,"retry":{"count":3,"interval":10},"tick_every":300},"steps":[{"allowFailure":false,"isCritical":true,"name":"Refresh page","params":{},"type":"refresh"}],"tags":["testing:browser"],"type":"browser"} form: {} headers: Accept: @@ -11,8 +11,9 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/browser response: - body: '{"status":"paused","public_id":"db9-2t7-rc6","tags":["testing:browser"],"org_id":321813,"locations":["aws:us-east-2"],"message":"Test - message","deleted_at":null,"name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1641430273","monitor_id":59800820,"type":"browser","created_at":"2022-01-06T00:51:13.906186+00:00","modified_at":"2022-01-06T00:51:13.906186+00:00","config":{"setCookie":"name:test","request":{"url":"https://datadoghq.com","method":"GET"},"assertions":[],"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,"noScreenshot":true,"disableCors":true,"device_ids":["tablet"],"tick_every":300}}' + body: '{"status":"paused","public_id":"rsw-sd4-iu5","tags":["testing:browser"],"org_id":321813,"locations":["aws:us-east-2"],"message":"Test + message","deleted_at":null,"name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1644495850","monitor_id":63812386,"type":"browser","created_at":"2022-02-10T12:24:11.196393+00:00","modified_at":"2022-02-10T12:24:11.196393+00:00","steps":[{"name":"Refresh + page","allowFailure":false,"params":{},"isCritical":true,"type":"refresh"}],"config":{"setCookie":"name:test","request":{"url":"https://datadoghq.com","method":"GET"},"assertions":[],"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,"noScreenshot":true,"disableCors":true,"device_ids":["tablet"],"tick_every":300}}' code: 200 duration: '' headers: @@ -21,7 +22,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["db9-2t7-rc6"]} + {"public_ids":["rsw-sd4-iu5"]} form: {} headers: Accept: @@ -31,7 +32,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-06T00:51:14.154081+00:00","public_id":"db9-2t7-rc6"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:11.753160+00:00","public_id":"rsw-sd4-iu5"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.freeze index 6cbd35fb149..88e903180fb 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.freeze @@ -1 +1 @@ -2022-01-11T18:26:30.141Z \ No newline at end of file +2022-02-10T12:24:11.728Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.yaml index a1bc1c22fae..0bd0168e2c9 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_returns_OK_-_Returns_the_created_test_details._response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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":{"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":"testcreateanapitestreturnsokreturnsthecreatedtestdetailsresponse1641925590"},"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_test_payload.json","name":"Test-Create_an_API_test_returns_OK_Returns_the_created_test_details_response-1641925590","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_returns_OK_Returns_the_created_test_details_response-1641925590","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"} + {"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":{"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":"testcreateanapitestreturnsokreturnsthecreatedtestdetailsresponse1644495851"},"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_test_payload.json","name":"Test-Create_an_API_test_returns_OK_Returns_the_created_test_details_response-1644495851","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_returns_OK_Returns_the_created_test_details_response-1644495851","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"} form: {} headers: Accept: @@ -11,9 +11,9 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/api response: - body: '{"status":"live","public_id":"gbf-27x-fyf","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-Create_an_API_test_returns_OK_Returns_the_created_test_details_response-1641925590","monitor_id":60619278,"type":"api","created_at":"2022-01-11T18:26:30.681233+00:00","modified_at":"2022-01-11T18:26:30.681233+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","headers":{"unique":"testcreateanapitestreturnsokreturnsthecreatedtestdetailsresponse1641925590"},"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"}}],"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_test_returns_OK_Returns_the_created_test_details_response-1641925590","tick_every":60}}' + body: '{"status":"live","public_id":"x87-4ez-4xz","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-Create_an_API_test_returns_OK_Returns_the_created_test_details_response-1644495851","monitor_id":63812387,"type":"api","created_at":"2022-02-10T12:24:12.489088+00:00","modified_at":"2022-02-10T12:24:12.489088+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","headers":{"unique":"testcreateanapitestreturnsokreturnsthecreatedtestdetailsresponse1644495851"},"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"}}],"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_test_returns_OK_Returns_the_created_test_details_response-1644495851","tick_every":60}}' code: 200 duration: '' headers: @@ -22,7 +22,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["gbf-27x-fyf"]} + {"public_ids":["x87-4ez-4xz"]} form: {} headers: Accept: @@ -32,7 +32,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-11T18:26:32.034575+00:00","public_id":"gbf-27x-fyf"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:13.010432+00:00","public_id":"x87-4ez-4xz"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze index 279389009cd..0457e749348 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze @@ -1 +1 @@ -2022-01-06T00:51:15.154Z \ No newline at end of file +2022-02-10T12:24:13.013Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml index c640af40d86..f900c00d292 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_UDP_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"config":{"assertions":[{"operator":"is","target":"message","type":"receivedMessage"},{"operator":"lessThan","target":2000,"type":"responseTime"}],"configVariables":[],"request":{"host":"https://datadoghq.com","message":"message","port":443}},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_test_udp_payload.json","name":"Test-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","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_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"udp","tags":["testing:api"],"type":"api"} + {"config":{"assertions":[{"operator":"is","target":"message","type":"receivedMessage"},{"operator":"lessThan","target":2000,"type":"responseTime"}],"configVariables":[],"request":{"host":"https://datadoghq.com","message":"message","port":443}},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_test_udp_payload.json","name":"Test-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1644495853","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_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1644495853","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"udp","tags":["testing:api"],"type":"api"} form: {} headers: Accept: @@ -11,8 +11,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/api response: - body: '{"status":"live","public_id":"x7m-knw-vsm","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_test_udp_payload.json","deleted_at":null,"name":"Test-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","monitor_id":59800839,"type":"api","created_at":"2022-01-06T00:51:15.394643+00:00","modified_at":"2022-01-06T00:51:15.394643+00:00","subtype":"udp","config":{"request":{"host":"https://datadoghq.com","message":"message","port":443},"assertions":[{"operator":"is","type":"receivedMessage","target":"message"},{"operator":"lessThan","type":"responseTime","target":2000}],"configVariables":[]},"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_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","tick_every":60}}' + body: '{"status":"live","public_id":"7sh-p28-ahf","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_test_udp_payload.json","deleted_at":null,"name":"Test-Create_an_API_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1644495853","monitor_id":63812388,"type":"api","created_at":"2022-02-10T12:24:13.755017+00:00","modified_at":"2022-02-10T12:24:13.755017+00:00","subtype":"udp","config":{"request":{"host":"https://datadoghq.com","message":"message","port":443},"assertions":[{"operator":"is","type":"receivedMessage","target":"message"},{"operator":"lessThan","type":"responseTime","target":2000}],"configVariables":[]},"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_test_with_UDP_subtype_returns_OK_Returns_the_created_test_details_response-1644495853","tick_every":60}}' code: 200 duration: '' headers: @@ -21,7 +21,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["x7m-knw-vsm"]} + {"public_ids":["7sh-p28-ahf"]} form: {} headers: Accept: @@ -31,7 +31,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-06T00:51:15.642811+00:00","public_id":"x7m-knw-vsm"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:14.268581+00:00","public_id":"7sh-p28-ahf"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze index 4727deb0737..c0f1973be54 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze @@ -1 +1 @@ -2022-01-06T00:51:15.773Z \ No newline at end of file +2022-02-10T12:24:14.241Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml index a288dd87a1c..c7cc3705bbd 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"config":{"assertions":[{"operator":"is","target":"message","type":"receivedMessage"},{"operator":"lessThan","target":2000,"type":"responseTime"}],"configVariables":[],"request":{"message":"message","url":"ws://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_test_websocket_payload.json","name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","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_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"websocket","tags":["testing:api"],"type":"api"} + {"config":{"assertions":[{"operator":"is","target":"message","type":"receivedMessage"},{"operator":"lessThan","target":2000,"type":"responseTime"}],"configVariables":[],"request":{"message":"message","url":"ws://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_test_websocket_payload.json","name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1644495854","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_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1644495854","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"websocket","tags":["testing:api"],"type":"api"} form: {} headers: Accept: @@ -11,8 +11,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/api response: - body: '{"status":"live","public_id":"hyf-x3m-tie","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_test_websocket_payload.json","deleted_at":null,"name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","monitor_id":59800848,"type":"api","created_at":"2022-01-06T00:51:16.204340+00:00","modified_at":"2022-01-06T00:51:16.204340+00:00","subtype":"websocket","config":{"request":{"url":"ws://datadoghq.com","message":"message"},"assertions":[{"operator":"is","type":"receivedMessage","target":"message"},{"operator":"lessThan","type":"responseTime","target":2000}],"configVariables":[]},"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_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1641430275","tick_every":60}}' + body: '{"status":"live","public_id":"tg3-2te-nb8","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_test_websocket_payload.json","deleted_at":null,"name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1644495854","monitor_id":63812389,"type":"api","created_at":"2022-02-10T12:24:14.960894+00:00","modified_at":"2022-02-10T12:24:14.960894+00:00","subtype":"websocket","config":{"request":{"url":"ws://datadoghq.com","message":"message"},"assertions":[{"operator":"is","type":"receivedMessage","target":"message"},{"operator":"lessThan","type":"responseTime","target":2000}],"configVariables":[]},"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_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1644495854","tick_every":60}}' code: 200 duration: '' headers: @@ -21,7 +21,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["hyf-x3m-tie"]} + {"public_ids":["tg3-2te-nb8"]} form: {} headers: Accept: @@ -31,7 +31,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-06T00:51:16.473017+00:00","public_id":"hyf-x3m-tie"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:15.453739+00:00","public_id":"tg3-2te-nb8"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze index ef475f49345..70c204327c9 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.freeze @@ -1 +1 @@ -2022-01-06T00:51:16.598Z \ No newline at end of file +2022-02-10T12:24:15.420Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml index 8db052afa7b..f339e640e51 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_an_API_test_with_multi_subtype_returns_OK_-_Returns_the_created_test_details._response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"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-1641430276","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-1641430276","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"} + {"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"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-1644495855","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-1644495855","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"} form: {} headers: Accept: @@ -11,9 +11,9 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/api response: - body: '{"status":"live","public_id":"kia-hd8-bct","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-1641430276","monitor_id":59800856,"type":"api","created_at":"2022-01-06T00:51:16.950611+00:00","modified_at":"2022-01-06T00:51:16.950611+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":"st2-8kw-wzc"}],"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-1641430276","tick_every":60}}' + body: '{"status":"live","public_id":"b9s-ywq-qhf","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-1644495855","monitor_id":63812390,"type":"api","created_at":"2022-02-10T12:24:16.216698+00:00","modified_at":"2022-02-10T12:24:16.216698+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":"78t-9y9-ejd"}],"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-1644495855","tick_every":60}}' code: 200 duration: '' headers: @@ -22,7 +22,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["kia-hd8-bct"]} + {"public_ids":["b9s-ywq-qhf"]} form: {} headers: Accept: @@ -32,7 +32,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-06T00:51:17.196033+00:00","public_id":"kia-hd8-bct"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:16.747773+00:00","public_id":"b9s-ywq-qhf"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.freeze index bc3d9a89d9f..c8b194bb06a 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.freeze @@ -1 +1 @@ -2022-01-11T18:26:32.079Z \ No newline at end of file +2022-02-10T12:24:16.771Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.yaml index 98b48dae382..1c21f517812 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_an_API_test_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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":{"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":"testeditanapitestreturnsokresponse1641925592"},"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_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1641925592","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1641925592","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"} + {"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":{"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":"testeditanapitestreturnsokresponse1644495856"},"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_test_payload.json","name":"Test-Edit_an_API_test_returns_OK_response-1644495856","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Edit_an_API_test_returns_OK_response-1644495856","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"} form: {} headers: Accept: @@ -11,9 +11,9 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/api response: - body: '{"status":"live","public_id":"wv2-tgy-dc7","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-1641925592","monitor_id":60619281,"type":"api","created_at":"2022-01-11T18:26:32.718582+00:00","modified_at":"2022-01-11T18:26:32.718582+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","headers":{"unique":"testeditanapitestreturnsokresponse1641925592"},"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"}}],"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-1641925592","tick_every":60}}' + body: '{"status":"live","public_id":"xdu-3kb-n4b","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-1644495856","monitor_id":63812391,"type":"api","created_at":"2022-02-10T12:24:17.500936+00:00","modified_at":"2022-02-10T12:24:17.500936+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","headers":{"unique":"testeditanapitestreturnsokresponse1644495856"},"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"}}],"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-1644495856","tick_every":60}}' code: 200 duration: '' headers: @@ -22,7 +22,7 @@ interactions: status: 200 OK - request: body: | - {"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":"testeditanapitestreturnsokresponse1641925592"},"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-1641925592-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"} + {"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":"testeditanapitestreturnsokresponse1644495856"},"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-1644495856-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"} form: {} headers: Accept: @@ -30,10 +30,10 @@ interactions: Content-Type: - application/json method: PUT - url: https://api.datadoghq.com/api/v1/synthetics/tests/api/wv2-tgy-dc7 + url: https://api.datadoghq.com/api/v1/synthetics/tests/api/xdu-3kb-n4b response: - body: '{"status":"live","public_id":"wv2-tgy-dc7","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-1641925592-updated","monitor_id":60619281,"type":"api","created_at":"2022-01-11T18:26:32.718582+00:00","modified_at":"2022-01-11T18:26:33.208668+00:00","subtype":"http","config":{"request":{"url":"https://datadoghq.com","headers":{"unique":"testeditanapitestreturnsokresponse1641925592"},"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":"{{ + body: '{"status":"live","public_id":"xdu-3kb-n4b","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-1644495856-updated","monitor_id":63812391,"type":"api","created_at":"2022-02-10T12:24:17.500936+00:00","modified_at":"2022-02-10T12:24:18.095318+00:00","subtype":"http","config":{"request":{"url":"https://datadoghq.com","headers":{"unique":"testeditanapitestreturnsokresponse1644495856"},"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}}' code: 200 duration: '' @@ -43,7 +43,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["wv2-tgy-dc7"]} + {"public_ids":["xdu-3kb-n4b"]} form: {} headers: Accept: @@ -53,7 +53,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-11T18:26:33.796917+00:00","public_id":"wv2-tgy-dc7"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:18.667573+00:00","public_id":"xdu-3kb-n4b"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.freeze index cf11c26c3cf..e14f3745c5c 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.freeze @@ -1 +1 @@ -2022-01-31T14:13:54.521Z \ No newline at end of file +2022-02-10T12:24:18.666Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.yaml index 58b6a837bc5..ccd748749a4 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_an_API_test_result_returns_result_with_failure_object.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"config":{"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"request":{"method":"GET","url":"https://app.datadfoghq.com"}},"locations":["aws:eu-west-3"],"message":"Testing wrong DNS error","name":"Test-Get_an_API_test_result_returns_result_with_failure_object-1643638434","options":{"min_failure_duration":0,"min_location_failed":1,"monitor_options":{"renotify_interval":0},"tick_every":86400},"subtype":"http","tags":[],"type":"api"} + {"config":{"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"request":{"method":"GET","url":"https://app.datadfoghq.com"}},"locations":["aws:eu-west-3"],"message":"Testing wrong DNS error","name":"Test-Get_an_API_test_result_returns_result_with_failure_object-1644495858","options":{"min_failure_duration":0,"min_location_failed":1,"monitor_options":{"renotify_interval":0},"tick_every":86400},"subtype":"http","tags":[],"type":"api"} form: {} headers: Accept: @@ -11,8 +11,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/api response: - body: '{"status":"live","public_id":"xgn-fta-kae","tags":[],"org_id":321813,"locations":["aws:eu-west-3"],"message":"Testing - wrong DNS error","deleted_at":null,"name":"Test-Get_an_API_test_result_returns_result_with_failure_object-1643638434","monitor_id":62456205,"type":"api","created_at":"2022-01-31T14:13:55.301638+00:00","modified_at":"2022-01-31T14:13:55.301638+00:00","subtype":"http","config":{"request":{"url":"https://app.datadfoghq.com","method":"GET"},"assertions":[{"operator":"lessThan","type":"responseTime","target":1000}]},"options":{"monitor_options":{"notify_audit":false,"locked":false,"include_tags":true,"new_host_delay":300,"notify_no_data":false,"renotify_interval":0},"tick_every":86400,"min_failure_duration":0,"min_location_failed":1}}' + body: '{"status":"live","public_id":"ive-g7h-dgu","tags":[],"org_id":321813,"locations":["aws:eu-west-3"],"message":"Testing + wrong DNS error","deleted_at":null,"name":"Test-Get_an_API_test_result_returns_result_with_failure_object-1644495858","monitor_id":63812392,"type":"api","created_at":"2022-02-10T12:24:19.316262+00:00","modified_at":"2022-02-10T12:24:19.316262+00:00","subtype":"http","config":{"request":{"url":"https://app.datadfoghq.com","method":"GET"},"assertions":[{"operator":"lessThan","type":"responseTime","target":1000}]},"options":{"monitor_options":{"notify_audit":false,"locked":false,"include_tags":true,"new_host_delay":300,"notify_no_data":false,"renotify_interval":0},"tick_every":86400,"min_failure_duration":0,"min_location_failed":1}}' code: 200 duration: '' headers: @@ -21,7 +21,7 @@ interactions: status: 200 OK - request: body: | - {"tests":[{"public_id":"xgn-fta-kae"}]} + {"tests":[{"public_id":"ive-g7h-dgu"}]} form: {} headers: Accept: @@ -31,7 +31,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/trigger response: - body: '{"batch_id":null,"results":[{"result_id":"3511815218314776466","public_id":"xgn-fta-kae","location":32153}],"triggered_check_ids":["xgn-fta-kae"],"locations":[{"display_name":"Paris + body: '{"batch_id":null,"results":[{"result_id":"990211588540730529","public_id":"ive-g7h-dgu","location":32153}],"triggered_check_ids":["ive-g7h-dgu"],"locations":[{"display_name":"Paris (AWS)","name":"aws:eu-west-3","region":"Europe","is_active":true,"is_public":true,"id":32153}]}' code: 200 duration: '' @@ -46,11 +46,11 @@ interactions: Accept: - application/json method: GET - url: https://api.datadoghq.com/api/v1/synthetics/tests/xgn-fta-kae/results/3511815218314776466 + url: https://api.datadoghq.com/api/v1/synthetics/tests/ive-g7h-dgu/results/990211588540730529 response: - body: '{"status":1,"run_type":3,"check_time":1643638436045,"check_version":1,"result":{"subtype":"http","eventType":"finished","timings":{"total":37.3,"dns":2.1},"failure":{"message":"Error + body: '{"status":1,"run_type":3,"check_time":1644495859933,"check_version":1,"result":{"subtype":"http","eventType":"finished","timings":{"total":45.8,"dns":14.5},"failure":{"message":"Error during DNS resolution (ENOTFOUND).","code":"DNS"},"mainDC":"us1.prod","passed":false,"error":"Error - during DNS resolution (ENOTFOUND).","runType":3,"enrichment":{}},"probe_dc":"aws:eu-west-3","result_id":"3511815218314776466","check":{"type":"api","config":{"request":{"url":"https://app.datadfoghq.com","method":"GET"},"assertions":[{"operator":"lessThan","type":"responseTime","target":1000}]},"options":{"monitor_options":{"notify_audit":false,"locked":false,"include_tags":true,"new_host_delay":300,"notify_no_data":false,"renotify_interval":0},"tick_every":86400,"min_failure_duration":0,"min_location_failed":1}}}' + during DNS resolution (ENOTFOUND).","runType":3,"enrichment":{}},"probe_dc":"aws:eu-west-3","result_id":"990211588540730529","check":{"type":"api","config":{"request":{"url":"https://app.datadfoghq.com","method":"GET"},"assertions":[{"operator":"lessThan","type":"responseTime","target":1000}]},"options":{"monitor_options":{"notify_audit":false,"locked":false,"include_tags":true,"new_host_delay":300,"notify_no_data":false,"renotify_interval":0},"tick_every":86400,"min_failure_duration":0,"min_location_failed":1}}}' code: 200 duration: '' headers: @@ -59,7 +59,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["xgn-fta-kae"]} + {"public_ids":["ive-g7h-dgu"]} form: {} headers: Accept: @@ -69,7 +69,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-31T14:13:56.956611+00:00","public_id":"xgn-fta-kae"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:21.045390+00:00","public_id":"ive-g7h-dgu"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.freeze index 3a748c6603c..edd5e40429e 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.freeze @@ -1 +1 @@ -2022-01-11T18:26:34.919Z \ No newline at end of file +2022-02-10T12:24:21.021Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.yaml index 701dd6b9ed6..5ffdbf02603 100644 --- a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Trigger_Synthetics_tests_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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":{"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":"testtriggersyntheticstestsreturnsokresponse1641925594"},"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_test_payload.json","name":"Test-Trigger_Synthetics_tests_returns_OK_response-1641925594","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Trigger_Synthetics_tests_returns_OK_response-1641925594","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"} + {"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":{"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":"testtriggersyntheticstestsreturnsokresponse1644495861"},"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_test_payload.json","name":"Test-Trigger_Synthetics_tests_returns_OK_response-1644495861","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Trigger_Synthetics_tests_returns_OK_response-1644495861","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"} form: {} headers: Accept: @@ -11,9 +11,9 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/api response: - body: '{"status":"live","public_id":"iw3-ggr-vqz","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-Trigger_Synthetics_tests_returns_OK_response-1641925594","monitor_id":60619283,"type":"api","created_at":"2022-01-11T18:26:35.500913+00:00","modified_at":"2022-01-11T18:26:35.500913+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","headers":{"unique":"testtriggersyntheticstestsreturnsokresponse1641925594"},"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"}}],"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-Trigger_Synthetics_tests_returns_OK_response-1641925594","tick_every":60}}' + body: '{"status":"live","public_id":"skb-dgn-9we","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-Trigger_Synthetics_tests_returns_OK_response-1644495861","monitor_id":63812394,"type":"api","created_at":"2022-02-10T12:24:21.760470+00:00","modified_at":"2022-02-10T12:24:21.760470+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","headers":{"unique":"testtriggersyntheticstestsreturnsokresponse1644495861"},"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"}}],"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-Trigger_Synthetics_tests_returns_OK_response-1644495861","tick_every":60}}' code: 200 duration: '' headers: @@ -22,7 +22,7 @@ interactions: status: 200 OK - request: body: | - {"tests":[{"public_id":"iw3-ggr-vqz"}]} + {"tests":[{"public_id":"skb-dgn-9we"}]} form: {} headers: Accept: @@ -32,7 +32,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/trigger response: - body: '{"batch_id":null,"results":[{"result_id":"8934964634168568244","public_id":"iw3-ggr-vqz","location":30005}],"triggered_check_ids":["iw3-ggr-vqz"],"locations":[{"display_name":"Ohio + body: '{"batch_id":null,"results":[{"result_id":"6901770802313039870","public_id":"skb-dgn-9we","location":30005}],"triggered_check_ids":["skb-dgn-9we"],"locations":[{"display_name":"Ohio (AWS)","name":"aws:us-east-2","region":"Americas","is_active":true,"is_public":true,"id":30005}]}' code: 200 duration: '' @@ -42,7 +42,7 @@ interactions: status: 200 OK - request: body: | - {"public_ids":["iw3-ggr-vqz"]} + {"public_ids":["skb-dgn-9we"]} form: {} headers: Accept: @@ -52,7 +52,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v1/synthetics/tests/delete response: - body: '{"deleted_tests":[{"deleted_at":"2022-01-11T18:26:36.317387+00:00","public_id":"iw3-ggr-vqz"}]}' + body: '{"deleted_tests":[{"deleted_at":"2022-02-10T12:24:22.776073+00:00","public_id":"skb-dgn-9we"}]}' code: 200 duration: '' headers: diff --git a/tests/scenarios/features/v1/synthetics.feature b/tests/scenarios/features/v1/synthetics.feature index 334e1bd97f2..0053937a003 100644 --- a/tests/scenarios/features/v1/synthetics.feature +++ b/tests/scenarios/features/v1/synthetics.feature @@ -34,7 +34,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-app Scenario: Create a browser test returns "- JSON format is wrong" response Given new "CreateSyntheticsBrowserTest" request - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "isCritical": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -49,7 +49,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-app Scenario: Create a browser test returns "Test quota is reached" response Given new "CreateSyntheticsBrowserTest" request - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "isCritical": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} When the request is sent Then the response status is 402 Test quota is reached @@ -198,7 +198,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "- JSON format is wrong" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "isCritical": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -206,7 +206,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "- Synthetic Monitoring is not activated for the user" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "isCritical": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} When the request is sent Then the response status is 404 - Synthetic Monitoring is not activated for the user @@ -214,7 +214,7 @@ Feature: Synthetics Scenario: Edit a browser test returns "OK" response Given new "UpdateBrowserTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} + And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}], "request": {"allow_insecure": null, "basicAuth": {"password": "", "type": "web", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "follow_redirects": null, "headers": null, "host": null, "message": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "proxy": {"headers": null, "url": "https://example.com"}, "query": null, "servername": null, "shouldTrackHops": null, "timeout": null, "url": "https://example.com"}, "setCookie": null, "variables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "text"}]}, "locations": ["example-location"], "message": "", "name": "Example test name", "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": null}, "status": "live", "steps": [{"allowFailure": null, "isCritical": null, "name": null, "params": null, "timeout": null, "type": "assertElementContent"}], "tags": [null], "type": "browser"} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/synthetics_browser_test_payload.json b/tests/scenarios/features/v1/synthetics_browser_test_payload.json index 03ff341a70b..91cab3728ca 100644 --- a/tests/scenarios/features/v1/synthetics_browser_test_payload.json +++ b/tests/scenarios/features/v1/synthetics_browser_test_payload.json @@ -28,5 +28,14 @@ "tick_every": 300 }, "tags": ["testing:browser"], - "type": "browser" + "type": "browser", + "steps": [ + { + "allowFailure": false, + "isCritical": true, + "name": "Refresh page", + "params": {}, + "type": "refresh" + } + ] }