Skip to content

Commit 3da5fa6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
add enableProfiling and enableSecurityTesting options (#2037)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent f58b820 commit 3da5fa6

File tree

7 files changed

+39
-11
lines changed

7 files changed

+39
-11
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-07-10 14:16:17.472609",
8-
"spec_repo_commit": "42021375"
7+
"regenerated": "2024-07-10 18:18:18.978343",
8+
"spec_repo_commit": "83dbc3db"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-10 14:16:17.489644",
13-
"spec_repo_commit": "42021375"
12+
"regenerated": "2024-07-10 18:18:18.995973",
13+
"spec_repo_commit": "83dbc3db"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15915,6 +15915,14 @@ components:
1591515915
disableCsp:
1591615916
description: Disable Content Security Policy for browser tests.
1591715917
type: boolean
15918+
enableProfiling:
15919+
description: Enable profiling for browser tests.
15920+
type: boolean
15921+
enableSecurityTesting:
15922+
deprecated: true
15923+
description: Enable security testing for browser tests. Security testing
15924+
is not available anymore. This field is deprecated and won't be used.
15925+
type: boolean
1591815926
follow_redirects:
1591915927
description: For API HTTP test, whether or not the test should follow redirects.
1592015928
type: boolean

examples/v1/synthetics/CreateSyntheticsBrowserTest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
interval=10.0,
6767
),
6868
tick_every=300,
69+
enable_profiling=True,
70+
enable_security_testing=True,
6971
),
7072
tags=[
7173
"testing:browser",

src/datadog_api_client/v1/model/synthetics_test_options.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def openapi_types(_):
5757
"device_ids": ([SyntheticsDeviceID],),
5858
"disable_cors": (bool,),
5959
"disable_csp": (bool,),
60+
"enable_profiling": (bool,),
61+
"enable_security_testing": (bool,),
6062
"follow_redirects": (bool,),
6163
"http_version": (SyntheticsTestOptionsHTTPVersion,),
6264
"ignore_server_certificate_error": (bool,),
@@ -82,6 +84,8 @@ def openapi_types(_):
8284
"device_ids": "device_ids",
8385
"disable_cors": "disableCors",
8486
"disable_csp": "disableCsp",
87+
"enable_profiling": "enableProfiling",
88+
"enable_security_testing": "enableSecurityTesting",
8589
"follow_redirects": "follow_redirects",
8690
"http_version": "httpVersion",
8791
"ignore_server_certificate_error": "ignoreServerCertificateError",
@@ -108,6 +112,8 @@ def __init__(
108112
device_ids: Union[List[SyntheticsDeviceID], UnsetType] = unset,
109113
disable_cors: Union[bool, UnsetType] = unset,
110114
disable_csp: Union[bool, UnsetType] = unset,
115+
enable_profiling: Union[bool, UnsetType] = unset,
116+
enable_security_testing: Union[bool, UnsetType] = unset,
111117
follow_redirects: Union[bool, UnsetType] = unset,
112118
http_version: Union[SyntheticsTestOptionsHTTPVersion, UnsetType] = unset,
113119
ignore_server_certificate_error: Union[bool, UnsetType] = unset,
@@ -150,6 +156,12 @@ def __init__(
150156
:param disable_csp: Disable Content Security Policy for browser tests.
151157
:type disable_csp: bool, optional
152158
159+
:param enable_profiling: Enable profiling for browser tests.
160+
:type enable_profiling: bool, optional
161+
162+
:param enable_security_testing: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used. **Deprecated**.
163+
:type enable_security_testing: bool, optional
164+
153165
:param follow_redirects: For API HTTP test, whether or not the test should follow redirects.
154166
:type follow_redirects: bool, optional
155167
@@ -221,6 +233,10 @@ def __init__(
221233
kwargs["disable_cors"] = disable_cors
222234
if disable_csp is not unset:
223235
kwargs["disable_csp"] = disable_csp
236+
if enable_profiling is not unset:
237+
kwargs["enable_profiling"] = enable_profiling
238+
if enable_security_testing is not unset:
239+
kwargs["enable_security_testing"] = enable_security_testing
224240
if follow_redirects is not unset:
225241
kwargs["follow_redirects"] = follow_redirects
226242
if http_version is not unset:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-01-26T13:21:41.908Z
1+
2024-07-10T11:52:27.901Z

tests/v1/cassettes/test_scenarios/test_create_a_browser_test_returns_ok_returns_the_created_test_details_response.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: '{"config":{"assertions":[],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","secure":true,"type":"text"}],"request":{"method":"GET","url":"https://datadoghq.com"},"setCookie":"name:test","variables":[{"example":"secret","name":"TEST_VARIABLE","pattern":"secret","secure":true,"type":"text"}]},"locations":["aws:us-east-2"],"message":"Test
4-
message","name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1706275301","options":{"accept_self_signed":false,"allow_insecure":true,"device_ids":["chrome.laptop_large"],"disableCors":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"noScreenshot":true,"retry":{"count":2,"interval":10},"tick_every":300},"steps":[{"allowFailure":false,"isCritical":true,"name":"Refresh
4+
message","name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1720612347","options":{"accept_self_signed":false,"allow_insecure":true,"device_ids":["chrome.laptop_large"],"disableCors":true,"enableProfiling":true,"enableSecurityTesting":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"noScreenshot":true,"retry":{"count":2,"interval":10},"tick_every":300},"steps":[{"allowFailure":false,"isCritical":true,"name":"Refresh
55
page","params":{},"type":"refresh"}],"tags":["testing:browser"],"type":"browser"}'
66
headers:
77
accept:
@@ -12,8 +12,8 @@ interactions:
1212
uri: https://api.datadoghq.com/api/v1/synthetics/tests/browser
1313
response:
1414
body:
15-
string: '{"public_id":"s58-re2-v8s","name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1706275301","status":"paused","type":"browser","tags":["testing:browser"],"created_at":"2024-01-26T13:21:42.472655+00:00","modified_at":"2024-01-26T13:21:42.472655+00:00","config":{"assertions":[],"configVariables":[{"name":"PROPERTY","secure":true,"type":"text"}],"request":{"method":"GET","url":"https://datadoghq.com"},"setCookie":"name:test","variables":[{"name":"TEST_VARIABLE","secure":true,"type":"text"}]},"message":"Test
16-
message","options":{"accept_self_signed":false,"allow_insecure":true,"device_ids":["chrome.laptop_large"],"disableCors":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"noScreenshot":true,"retry":{"count":2,"interval":10},"tick_every":300},"locations":["aws:us-east-2"],"created_by":{"name":"Frog","handle":"[email protected]","email":"[email protected]"},"deleted_at":null,"monitor_id":138453230,"org_id":569509,"modified_by":{"name":"Frog","handle":"[email protected]","email":"[email protected]"},"steps":[{"name":"Refresh
15+
string: '{"public_id":"j34-jum-nef","name":"Test-Create_a_browser_test_returns_OK_Returns_the_created_test_details_response-1720612347","status":"paused","type":"browser","tags":["testing:browser"],"created_at":"2024-07-10T11:52:28.494877+00:00","modified_at":"2024-07-10T11:52:28.494877+00:00","config":{"assertions":[],"configVariables":[{"name":"PROPERTY","secure":true,"type":"text"}],"request":{"method":"GET","url":"https://datadoghq.com"},"setCookie":"name:test","variables":[{"name":"TEST_VARIABLE","secure":true,"type":"text"}]},"message":"Test
16+
message","options":{"accept_self_signed":false,"allow_insecure":true,"device_ids":["chrome.laptop_large"],"disableCors":true,"enableProfiling":true,"enableSecurityTesting":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"noScreenshot":true,"retry":{"count":2,"interval":10},"tick_every":300},"locations":["aws:us-east-2"],"created_by":{"name":null,"handle":"[email protected]","email":"[email protected]"},"deleted_at":null,"monitor_id":148931232,"org_id":321813,"modified_by":{"name":null,"handle":"[email protected]","email":"[email protected]"},"steps":[{"name":"Refresh
1717
page","params":{},"type":"refresh","allowFailure":false,"isCritical":true}],"stepCount":{"assertions":0,"subtests":0,"total":1}}'
1818
headers:
1919
content-type:
@@ -22,7 +22,7 @@ interactions:
2222
code: 200
2323
message: OK
2424
- request:
25-
body: '{"public_ids":["s58-re2-v8s"]}'
25+
body: '{"public_ids":["j34-jum-nef"]}'
2626
headers:
2727
accept:
2828
- application/json
@@ -32,7 +32,7 @@ interactions:
3232
uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete
3333
response:
3434
body:
35-
string: '{"deleted_tests":[{"public_id":"s58-re2-v8s","deleted_at":"2024-01-26T13:21:42.969942+00:00"}]}
35+
string: '{"deleted_tests":[{"public_id":"j34-jum-nef","deleted_at":"2024-07-10T11:52:30.153321+00:00"}]}
3636
3737
'
3838
headers:

tests/v1/features/synthetics_browser_test_payload.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
"min_location_failed": 1,
3636
"noScreenshot": true,
3737
"retry": { "count": 2, "interval": 10 },
38-
"tick_every": 300
38+
"tick_every": 300,
39+
"enableProfiling": true,
40+
"enableSecurityTesting": true
3941
},
4042
"tags": ["testing:browser"],
4143
"type": "browser",

0 commit comments

Comments
 (0)