Skip to content

Add persistCookies option synthetics test request #1620

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.5",
"regenerated": "2023-08-11 17:08:58.152185",
"spec_repo_commit": "0b6bfbed"
"regenerated": "2023-08-11 18:45:35.501502",
"spec_repo_commit": "54e2961f"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-08-11 17:08:58.164642",
"spec_repo_commit": "0b6bfbed"
"regenerated": "2023-08-11 18:45:35.513739",
"spec_repo_commit": "54e2961f"
}
}
}
3 changes: 3 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14664,6 +14664,9 @@ components:
maximum: 10
minimum: 0
type: integer
persistCookies:
description: Persist cookies across redirects.
type: boolean
port:
description: Port to use when performing the test.
format: int64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
token_api_authentication=SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER,
type=SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT,
),
persist_cookies=True,
),
),
locations=[
Expand Down
8 changes: 8 additions & 0 deletions src/datadog_api_client/v1/model/synthetics_test_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def openapi_types(_):
"method": (str,),
"no_saving_response_body": (bool,),
"number_of_packets": (int,),
"persist_cookies": (bool,),
"port": (int,),
"proxy": (SyntheticsTestRequestProxy,),
"query": (dict,),
Expand Down Expand Up @@ -99,6 +100,7 @@ def openapi_types(_):
"method": "method",
"no_saving_response_body": "noSavingResponseBody",
"number_of_packets": "numberOfPackets",
"persist_cookies": "persistCookies",
"port": "port",
"proxy": "proxy",
"query": "query",
Expand Down Expand Up @@ -138,6 +140,7 @@ def __init__(
method: Union[str, UnsetType] = unset,
no_saving_response_body: Union[bool, UnsetType] = unset,
number_of_packets: Union[int, UnsetType] = unset,
persist_cookies: Union[bool, UnsetType] = unset,
port: Union[int, UnsetType] = unset,
proxy: Union[SyntheticsTestRequestProxy, UnsetType] = unset,
query: Union[dict, UnsetType] = unset,
Expand Down Expand Up @@ -205,6 +208,9 @@ def __init__(
:param number_of_packets: Number of pings to use per test.
:type number_of_packets: int, optional

:param persist_cookies: Persist cookies across redirects.
:type persist_cookies: bool, optional

:param port: Port to use when performing the test.
:type port: int, optional

Expand Down Expand Up @@ -267,6 +273,8 @@ def __init__(
kwargs["no_saving_response_body"] = no_saving_response_body
if number_of_packets is not unset:
kwargs["number_of_packets"] = number_of_packets
if persist_cookies is not unset:
kwargs["persist_cookies"] = persist_cookies
if port is not unset:
kwargs["port"] = port
if proxy is not unset:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-01-11T22:23:00.967Z
2023-08-11T15:25:10.265Z
Original file line number Diff line number Diff line change
@@ -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"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"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":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1673475780"},"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_http_test_payload.json","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}'
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"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"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":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD
test payload: synthetics_api_http_test_payload.json","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"http","tags":["testing:api"],"type":"api"}'
headers:
accept:
- application/json
Expand All @@ -11,17 +11,17 @@ interactions:
uri: https://api.datadoghq.com/api/v1/synthetics/tests/api
response:
body:
string: '{"status":"live","public_id":"v95-t96-e52","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD
test payload: synthetics_api_http_test_payload.json","deleted_at":null,"name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780","monitor_id":107572226,"type":"api","created_at":"2023-01-11T22:23:01.221860+00:00","modified_at":"2023-01-11T22:23:01.221860+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","basicAuth":{"clientSecret":"client-secret","resource":"resource","accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","scope":"yoyo","type":"oauth-client","tokenApiAuthentication":"header"},"headers":{"unique":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1673475780"},"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"}},{"operator":"validatesXPath","type":"body","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"}}],"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_HTTP_test_returns_OK_Returns_the_created_test_details_response-1673475780","tick_every":60,"httpVersion":"http2"}}'
string: '{"public_id":"p5t-6vv-3xj","name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510","status":"live","type":"api","tags":["testing:api"],"created_at":"2023-08-11T15:25:10.474768+00:00","modified_at":"2023-08-11T15:25:10.474768+00:00","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"},{"operator":"validatesXPath","target":{"operator":"contains","targetValue":"0","xPath":"target-xpath"},"type":"body"}],"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"request":{"basicAuth":{"accessTokenUrl":"https://datadog-token.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","resource":"resource","scope":"yoyo","tokenApiAuthentication":"header","type":"oauth-client"},"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":"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510"},"method":"GET","persistCookies":true,"proxy":{"headers":{},"url":"https://datadoghq.com"},"timeout":10,"url":"https://datadoghq.com"}},"message":"BDD
test payload: synthetics_api_http_test_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"httpVersion":"http2","min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"http","created_by":{"name":null,"handle":"[email protected]","email":"[email protected]"},"deleted_at":null,"monitor_id":128997418,"org_id":321813,"modified_by":{"name":null,"handle":"[email protected]","email":"[email protected]"}}'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"public_ids":["v95-t96-e52"]}'
body: '{"public_ids":["p5t-6vv-3xj"]}'
headers:
accept:
- application/json
Expand All @@ -31,7 +31,7 @@ interactions:
uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete
response:
body:
string: '{"deleted_tests":[{"deleted_at":"2023-01-11T22:23:01.652785+00:00","public_id":"v95-t96-e52"}]}
string: '{"deleted_tests":[{"public_id":"p5t-6vv-3xj","deleted_at":"2023-08-11T15:25:10.679107+00:00"}]}

'
headers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-01-11T22:27:11.207Z
2023-08-11T15:25:10.775Z
Loading