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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-19 07:26:20.419256",
"spec_repo_commit": "5dd2cbe4"
"regenerated": "2024-12-23 16:35:38.708989",
"spec_repo_commit": "19946d35"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-19 07:26:20.435562",
"spec_repo_commit": "5dd2cbe4"
"regenerated": "2024-12-23 16:35:38.724544",
"spec_repo_commit": "19946d35"
}
}
}
3 changes: 3 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16274,6 +16274,9 @@ components:
params:
description: The parameters of the step.
type: object
public_id:
description: The public ID of the step.
type: string
timeout:
description: The time before declaring a step failed.
format: int64
Expand Down
17 changes: 17 additions & 0 deletions src/datadogV1/model/model_synthetics_step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub struct SyntheticsStep {
/// The parameters of the step.
#[serde(rename = "params")]
pub params: Option<std::collections::BTreeMap<String, serde_json::Value>>,
/// The public ID of the step.
#[serde(rename = "public_id")]
pub public_id: Option<String>,
/// The time before declaring a step failed.
#[serde(rename = "timeout")]
pub timeout: Option<i64>,
Expand All @@ -55,6 +58,7 @@ impl SyntheticsStep {
name: None,
no_screenshot: None,
params: None,
public_id: None,
timeout: None,
type_: None,
additional_properties: std::collections::BTreeMap::new(),
Expand Down Expand Up @@ -97,6 +101,11 @@ impl SyntheticsStep {
self
}

pub fn public_id(mut self, value: String) -> Self {
self.public_id = Some(value);
self
}

pub fn timeout(mut self, value: i64) -> Self {
self.timeout = Some(value);
self
Expand Down Expand Up @@ -147,6 +156,7 @@ impl<'de> Deserialize<'de> for SyntheticsStep {
let mut no_screenshot: Option<bool> = None;
let mut params: Option<std::collections::BTreeMap<String, serde_json::Value>> =
None;
let mut public_id: Option<String> = None;
let mut timeout: Option<i64> = None;
let mut type_: Option<crate::datadogV1::model::SyntheticsStepType> = None;
let mut additional_properties: std::collections::BTreeMap<
Expand Down Expand Up @@ -204,6 +214,12 @@ impl<'de> Deserialize<'de> for SyntheticsStep {
}
params = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"public_id" => {
if v.is_null() {
continue;
}
public_id = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"timeout" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -242,6 +258,7 @@ impl<'de> Deserialize<'de> for SyntheticsStep {
name,
no_screenshot,
params,
public_id,
timeout,
type_,
additional_properties,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-12-09T11:17:43.729Z
2024-12-23T09:47:16.115Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"string": "{\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"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_saved_rumSettings_response-1733743063\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"steps\":[{\"allowFailure\":false,\"isCritical\":true,\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\"}],\"tags\":[\"testing:browser\"],\"type\":\"browser\"}",
"string": "{\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"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_saved_rumSettings_response-1734947236\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"steps\":[{\"allowFailure\":false,\"isCritical\":true,\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\"}],\"tags\":[\"testing:browser\"],\"type\":\"browser\"}",
"encoding": null
},
"headers": {
Expand All @@ -19,7 +19,7 @@
},
"response": {
"body": {
"string": "{\"public_id\":\"jj5-nke-dq2\",\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1733743063\",\"status\":\"paused\",\"type\":\"browser\",\"tags\":[\"testing:browser\"],\"created_at\":\"2024-12-09T11:17:44.348239+00:00\",\"modified_at\":\"2024-12-09T11:17:44.348239+00:00\",\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"method\":\"GET\",\"url\":\"https://datadoghq.com\"},\"setCookie\":\"name:test\"},\"message\":\"Test message\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"locations\":[\"aws:us-east-2\"],\"created_by\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"deleted_at\":null,\"monitor_id\":159881000,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"steps\":[{\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\",\"public_id\":\"yb6-rim-kwp\",\"allowFailure\":false,\"isCritical\":true}],\"stepCount\":{\"assertions\":0,\"subtests\":0,\"total\":1}}",
"string": "{\"public_id\":\"2pq-h6b-phj\",\"name\":\"Test-Create_a_browser_test_returns_OK_Returns_saved_rumSettings_response-1734947236\",\"status\":\"paused\",\"type\":\"browser\",\"tags\":[\"testing:browser\"],\"created_at\":\"2024-12-23T09:47:16.924773+00:00\",\"modified_at\":\"2024-12-23T09:47:16.924773+00:00\",\"config\":{\"assertions\":[],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"certificateDomains\":[\"https://datadoghq.com\"],\"method\":\"GET\",\"url\":\"https://datadoghq.com\"},\"setCookie\":\"name:test\"},\"message\":\"Test message\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"ci\":{\"executionRule\":\"skipped\"},\"device_ids\":[\"tablet\"],\"disableCors\":true,\"disableCsp\":true,\"follow_redirects\":true,\"ignoreServerCertificateError\":true,\"initialNavigationTimeout\":200,\"min_failure_duration\":10,\"min_location_failed\":1,\"noScreenshot\":true,\"retry\":{\"count\":2,\"interval\":10},\"rumSettings\":{\"applicationId\":\"mockApplicationId\",\"clientTokenId\":12345,\"isEnabled\":true},\"tick_every\":300},\"locations\":[\"aws:us-east-2\"],\"created_by\":{\"name\":\"frog\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"deleted_at\":null,\"monitor_id\":161011666,\"org_id\":321813,\"modified_by\":{\"name\":\"frog\",\"handle\":\"[email protected]\",\"email\":\"[email protected]\"},\"steps\":[{\"name\":\"Refresh page\",\"params\":{},\"type\":\"refresh\",\"public_id\":\"uwt-8ia-g4p\",\"allowFailure\":false,\"isCritical\":true}],\"stepCount\":{\"assertions\":0,\"subtests\":0,\"total\":1}}",
"encoding": null
},
"headers": {
Expand All @@ -32,12 +32,12 @@
"message": "OK"
}
},
"recorded_at": "Mon, 09 Dec 2024 11:17:43 GMT"
"recorded_at": "Mon, 23 Dec 2024 09:47:16 GMT"
},
{
"request": {
"body": {
"string": "{\"public_ids\":[\"jj5-nke-dq2\"]}",
"string": "{\"public_ids\":[\"2pq-h6b-phj\"]}",
"encoding": null
},
"headers": {
Expand All @@ -53,7 +53,7 @@
},
"response": {
"body": {
"string": "{\"deleted_tests\":[{\"public_id\":\"jj5-nke-dq2\",\"deleted_at\":\"2024-12-09T11:17:45.340410+00:00\"}]}\n",
"string": "{\"deleted_tests\":[{\"public_id\":\"2pq-h6b-phj\",\"deleted_at\":\"2024-12-23T09:47:17.898440+00:00\"}]}\n",
"encoding": null
},
"headers": {
Expand All @@ -66,7 +66,7 @@
"message": "OK"
}
},
"recorded_at": "Mon, 09 Dec 2024 11:17:43 GMT"
"recorded_at": "Mon, 23 Dec 2024 09:47:16 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
1 change: 1 addition & 0 deletions tests/scenarios/features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Feature: Synthetics
And the response "options.rumSettings.isEnabled" is equal to true
And the response "options.rumSettings.applicationId" is equal to "mockApplicationId"
And the response "options.rumSettings.clientTokenId" is equal to 12345
And the response "steps[0]" has field "public_id"

@team:DataDog/synthetics-ct
Scenario: Create a browser test returns "OK - Returns the created test details." response
Expand Down
Loading