diff --git a/.apigentools-info b/.apigentools-info index 768ac675c6..11c4e8ab5b 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -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" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index dc238c59a7..1a448cf0f1 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -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 diff --git a/setup.cfg b/setup.cfg index cc23d96d7b..0899b7198e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -66,6 +66,7 @@ tests = python-dateutil mypy types-python-dateutil + urllib3<2.3.0 zstandard [options.packages.find] diff --git a/src/datadog_api_client/v1/model/synthetics_step.py b/src/datadog_api_client/v1/model/synthetics_step.py index 78eab20ca7..8ec27e0158 100644 --- a/src/datadog_api_client/v1/model/synthetics_step.py +++ b/src/datadog_api_client/v1/model/synthetics_step.py @@ -30,6 +30,7 @@ def openapi_types(_): "name": (str,), "no_screenshot": (bool,), "params": (dict,), + "public_id": (str,), "timeout": (int,), "type": (SyntheticsStepType,), } @@ -42,6 +43,7 @@ def openapi_types(_): "name": "name", "no_screenshot": "noScreenshot", "params": "params", + "public_id": "public_id", "timeout": "timeout", "type": "type", } @@ -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, @@ -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 @@ -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: diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.frozen index f2906cd9b1..3c0fb9e945 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.frozen @@ -1 +1 @@ -2024-12-09T11:17:43.729Z \ No newline at end of file +2024-12-23T09:47:16.115Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.yaml index a7488eb12c..cdc3792307 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_saved_rumsettings_response.yaml @@ -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: @@ -12,9 +12,9 @@ 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":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":159881000,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"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":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":161011666,"org_id":321813,"modified_by":{"name":"frog","handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"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 @@ -22,7 +22,7 @@ interactions: code: 200 message: OK - request: - body: '{"public_ids":["jj5-nke-dq2"]}' + body: '{"public_ids":["2pq-h6b-phj"]}' headers: accept: - application/json @@ -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: diff --git a/tests/v1/features/synthetics.feature b/tests/v1/features/synthetics.feature index 3a6b14a294..c6962b4dba 100644 --- a/tests/v1/features/synthetics.feature +++ b/tests/v1/features/synthetics.feature @@ -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