Skip to content

Add synthetics browser step public_id field #2183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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:25.280337",
"spec_repo_commit": "5dd2cbe4"
"regenerated": "2024-12-23 16:35:40.482863",
"spec_repo_commit": "19946d35"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-19 07:26:25.294170",
"spec_repo_commit": "5dd2cbe4"
"regenerated": "2024-12-23 16:35:40.496603",
"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
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ tests =
python-dateutil
mypy
types-python-dateutil
urllib3<2.3.0
zstandard

[options.packages.find]
Expand Down
8 changes: 8 additions & 0 deletions src/datadog_api_client/v1/model/synthetics_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def openapi_types(_):
"name": (str,),
"no_screenshot": (bool,),
"params": (dict,),
"public_id": (str,),
"timeout": (int,),
"type": (SyntheticsStepType,),
}
Expand All @@ -42,6 +43,7 @@ def openapi_types(_):
"name": "name",
"no_screenshot": "noScreenshot",
"params": "params",
"public_id": "public_id",
"timeout": "timeout",
"type": "type",
}
Expand All @@ -55,6 +57,7 @@ def __init__(
name: Union[str, UnsetType] = unset,
no_screenshot: Union[bool, UnsetType] = unset,
params: Union[dict, UnsetType] = unset,
public_id: Union[str, UnsetType] = unset,
timeout: Union[int, UnsetType] = unset,
type: Union[SyntheticsStepType, UnsetType] = unset,
**kwargs,
Expand Down Expand Up @@ -83,6 +86,9 @@ def __init__(
:param params: The parameters of the step.
:type params: dict, optional

:param public_id: The public ID of the step.
:type public_id: str, optional

:param timeout: The time before declaring a step failed.
:type timeout: int, optional

Expand All @@ -103,6 +109,8 @@ def __init__(
kwargs["no_screenshot"] = no_screenshot
if params is not unset:
kwargs["params"] = params
if public_id is not unset:
kwargs["public_id"] = public_id
if timeout is not unset:
kwargs["timeout"] = timeout
if type is not unset:
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
@@ -1,7 +1,7 @@
interactions:
- request:
body: '{"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
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"}'
headers:
accept:
Expand All @@ -12,17 +12,17 @@ interactions:
uri: https://api.datadoghq.com/api/v1/synthetics/tests/browser
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}}'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"public_ids":["jj5-nke-dq2"]}'
body: '{"public_ids":["2pq-h6b-phj"]}'
headers:
accept:
- application/json
Expand All @@ -32,7 +32,7 @@ interactions:
uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete
response:
body:
string: '{"deleted_tests":[{"public_id":"jj5-nke-dq2","deleted_at":"2024-12-09T11:17:45.340410+00:00"}]}
string: '{"deleted_tests":[{"public_id":"2pq-h6b-phj","deleted_at":"2024-12-23T09:47:17.898440+00:00"}]}

'
headers:
Expand Down
1 change: 1 addition & 0 deletions tests/v1/features/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