Skip to content

Commit bd0bc9c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[SYNTH-13257] allow setting httpVersion on a step of multi api test (#1891)
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 726985e commit bd0bc9c

12 files changed

+52
-33
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-03-13 14:23:23.963757",
8-
"spec_repo_commit": "113614d8"
7+
"regenerated": "2024-03-13 18:08:57.069927",
8+
"spec_repo_commit": "29884c34"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-03-13 14:23:23.990153",
13-
"spec_repo_commit": "113614d8"
12+
"regenerated": "2024-03-13 18:08:57.086714",
13+
"spec_repo_commit": "29884c34"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15826,6 +15826,8 @@ components:
1582615826
host:
1582715827
description: Host name to perform the test with.
1582815828
type: string
15829+
httpVersion:
15830+
$ref: '#/components/schemas/SyntheticsTestOptionsHTTPVersion'
1582915831
message:
1583015832
description: Message to send for UDP or WebSocket tests.
1583115833
type: string

examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
2424
from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata
2525
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
26+
from datadog_api_client.v1.model.synthetics_test_options_http_version import SyntheticsTestOptionsHTTPVersion
2627
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
2728
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest
2829
from datadog_api_client.v1.model.synthetics_variable_parser import SyntheticsVariableParser
@@ -64,6 +65,7 @@
6465
method="GET",
6566
timeout=10.0,
6667
url="https://datadoghq.com",
68+
http_version=SyntheticsTestOptionsHTTPVersion.HTTP2,
6769
),
6870
retry=SyntheticsTestOptionsRetry(
6971
count=5,

examples/v1/synthetics/UpdateBrowserTest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
key=SyntheticsTestRequestCertificateItem(),
6060
),
6161
certificate_domains=[],
62+
http_version=SyntheticsTestOptionsHTTPVersion.HTTP1,
6263
proxy=SyntheticsTestRequestProxy(
6364
url="https://example.com",
6465
),

src/datadog_api_client/v1/model/synthetics_test_request.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType
2020
from datadog_api_client.v1.model.synthetics_test_request_certificate import SyntheticsTestRequestCertificate
2121
from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders
22+
from datadog_api_client.v1.model.synthetics_test_options_http_version import SyntheticsTestOptionsHTTPVersion
2223
from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata
2324
from datadog_api_client.v1.model.synthetics_test_request_proxy import SyntheticsTestRequestProxy
2425
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
@@ -48,6 +49,7 @@ def openapi_types(_):
4849
from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType
4950
from datadog_api_client.v1.model.synthetics_test_request_certificate import SyntheticsTestRequestCertificate
5051
from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders
52+
from datadog_api_client.v1.model.synthetics_test_options_http_version import SyntheticsTestOptionsHTTPVersion
5153
from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata
5254
from datadog_api_client.v1.model.synthetics_test_request_proxy import SyntheticsTestRequestProxy
5355

@@ -66,6 +68,7 @@ def openapi_types(_):
6668
"follow_redirects": (bool,),
6769
"headers": (SyntheticsTestHeaders,),
6870
"host": (str,),
71+
"http_version": (SyntheticsTestOptionsHTTPVersion,),
6972
"message": (str,),
7073
"metadata": (SyntheticsTestMetadata,),
7174
"method": (str,),
@@ -97,6 +100,7 @@ def openapi_types(_):
97100
"follow_redirects": "follow_redirects",
98101
"headers": "headers",
99102
"host": "host",
103+
"http_version": "httpVersion",
100104
"message": "message",
101105
"metadata": "metadata",
102106
"method": "method",
@@ -138,6 +142,7 @@ def __init__(
138142
follow_redirects: Union[bool, UnsetType] = unset,
139143
headers: Union[SyntheticsTestHeaders, UnsetType] = unset,
140144
host: Union[str, UnsetType] = unset,
145+
http_version: Union[SyntheticsTestOptionsHTTPVersion, UnsetType] = unset,
141146
message: Union[str, UnsetType] = unset,
142147
metadata: Union[SyntheticsTestMetadata, UnsetType] = unset,
143148
method: Union[str, UnsetType] = unset,
@@ -199,6 +204,9 @@ def __init__(
199204
:param host: Host name to perform the test with.
200205
:type host: str, optional
201206
207+
:param http_version: HTTP version to use for a Synthetic test.
208+
:type http_version: SyntheticsTestOptionsHTTPVersion, optional
209+
202210
:param message: Message to send for UDP or WebSocket tests.
203211
:type message: str, optional
204212
@@ -271,6 +279,8 @@ def __init__(
271279
kwargs["headers"] = headers
272280
if host is not unset:
273281
kwargs["host"] = host
282+
if http_version is not unset:
283+
kwargs["http_version"] = http_version
274284
if message is not unset:
275285
kwargs["message"] = message
276286
if metadata is not unset:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-02-14T09:56:55.385Z
1+
2024-03-13T08:48:00.559Z

tests/v1/cassettes/test_scenarios/test_create_a_global_variable_from_test_returns_ok_response.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
interactions:
22
- request:
33
body: '{"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request
4-
is sent","request":{"method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC
4+
is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC
55
CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc"}]},"locations":["aws:us-east-2"],"message":"BDD
6-
test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1707904615","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1707904615","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}'
6+
test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}'
77
headers:
88
accept:
99
- application/json
@@ -13,11 +13,11 @@ interactions:
1313
uri: https://api.datadoghq.com/api/v1/synthetics/tests/api
1414
response:
1515
body:
16-
string: '{"public_id":"6td-hmb-t6f","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1707904615","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-02-14T09:56:55.729504+00:00","modified_at":"2024-02-14T09:56:55.729504+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request
17-
is sent","request":{"method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"7g9-x3d-mid"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC
18-
CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"xnr-5zr-293"}]},"message":"BDD
19-
test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1707904615","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":"CI
20-
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"[email protected]"},"deleted_at":null,"monitor_id":139518955,"org_id":321813,"modified_by":{"name":"CI
16+
string: '{"public_id":"hke-w83-j6r","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-03-13T08:48:01.233193+00:00","modified_at":"2024-03-13T08:48:01.233193+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request
17+
is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"bba-utu-dpy"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC
18+
CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"tax-mfs-p3v"}]},"message":"BDD
19+
test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1710319680","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":"CI
20+
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"[email protected]"},"deleted_at":null,"monitor_id":141300469,"org_id":321813,"modified_by":{"name":"CI
2121
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"[email protected]"}}'
2222
headers:
2323
content-type:
@@ -26,7 +26,7 @@ interactions:
2626
code: 200
2727
message: OK
2828
- request:
29-
body: '{"description":"","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1707904615","parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_public_id":"6td-hmb-t6f","tags":[],"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}'
29+
body: '{"description":"","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1710319680","parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_public_id":"hke-w83-j6r","tags":[],"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}'
3030
headers:
3131
accept:
3232
- application/json
@@ -36,7 +36,7 @@ interactions:
3636
uri: https://api.datadoghq.com/api/v1/synthetics/variables
3737
response:
3838
body:
39-
string: '{"id":"b8daafc5-09e1-4f63-9f44-c973b2ec57dc","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1707904615","description":"","type":"variable","tags":[],"parse_test_public_id":"6td-hmb-t6f","parse_test_name":null,"parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}
39+
string: '{"id":"d4597027-2f9b-4595-8c10-7ea475bdcf0f","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1710319680","description":"","type":"variable","tags":[],"parse_test_public_id":"hke-w83-j6r","parse_test_name":null,"parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}
4040
4141
'
4242
headers:
@@ -51,7 +51,7 @@ interactions:
5151
accept:
5252
- '*/*'
5353
method: DELETE
54-
uri: https://api.datadoghq.com/api/v1/synthetics/variables/b8daafc5-09e1-4f63-9f44-c973b2ec57dc
54+
uri: https://api.datadoghq.com/api/v1/synthetics/variables/d4597027-2f9b-4595-8c10-7ea475bdcf0f
5555
response:
5656
body:
5757
string: ''
@@ -62,7 +62,7 @@ interactions:
6262
code: 200
6363
message: OK
6464
- request:
65-
body: '{"public_ids":["6td-hmb-t6f"]}'
65+
body: '{"public_ids":["hke-w83-j6r"]}'
6666
headers:
6767
accept:
6868
- application/json
@@ -72,7 +72,7 @@ interactions:
7272
uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete
7373
response:
7474
body:
75-
string: '{"deleted_tests":[{"public_id":"6td-hmb-t6f","deleted_at":"2024-02-14T09:56:56.985642+00:00"}]}
75+
string: '{"deleted_tests":[{"public_id":"hke-w83-j6r","deleted_at":"2024-03-13T08:48:02.740088+00:00"}]}
7676
7777
'
7878
headers:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-02-14T09:52:43.647Z
1+
2024-03-13T08:48:03.203Z

0 commit comments

Comments
 (0)