Skip to content
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

Make grpc steps available for synthetics api multisteps tests #2384

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-02-14 10:50:03.602357",
"spec_repo_commit": "9348385b"
"regenerated": "2024-02-15 11:25:05.966437",
"spec_repo_commit": "14c48bc8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-02-14 10:50:03.618501",
"spec_repo_commit": "9348385b"
"regenerated": "2024-02-15 11:25:05.981185",
"spec_repo_commit": "14c48bc8"
}
}
}
2 changes: 2 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13213,10 +13213,12 @@ components:
only supporting `http`.
enum:
- http
- grpc
example: http
type: string
x-enum-varnames:
- HTTP
- GRPC
SyntheticsAPITest:
description: Object containing details about a Synthetic API test.
properties:
Expand Down
2 changes: 2 additions & 0 deletions api/datadogV1/model_synthetics_api_step_subtype.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ type SyntheticsAPIStepSubtype string
// List of SyntheticsAPIStepSubtype.
const (
SYNTHETICSAPISTEPSUBTYPE_HTTP SyntheticsAPIStepSubtype = "http"
SYNTHETICSAPISTEPSUBTYPE_GRPC SyntheticsAPIStepSubtype = "grpc"
)

var allowedSyntheticsAPIStepSubtypeEnumValues = []SyntheticsAPIStepSubtype{
SYNTHETICSAPISTEPSUBTYPE_HTTP,
SYNTHETICSAPISTEPSUBTYPE_GRPC,
}

// GetAllowedValues reeturns the list of possible values.
Expand Down
29 changes: 29 additions & 0 deletions examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,35 @@ func main() {
},
Subtype: datadogV1.SYNTHETICSAPISTEPSUBTYPE_HTTP,
},
{
Name: "GRPC CALL",
Subtype: datadogV1.SYNTHETICSAPISTEPSUBTYPE_GRPC,
ExtractedValues: []datadogV1.SyntheticsParsingOptions{},
AllowFailure: datadog.PtrBool(false),
IsCritical: datadog.PtrBool(true),
Retry: &datadogV1.SyntheticsTestOptionsRetry{
Count: datadog.PtrInt64(0),
Interval: datadog.PtrFloat64(300),
},
Assertions: []datadogV1.SyntheticsAssertion{
datadogV1.SyntheticsAssertion{
SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_LESS_THAN,
Type: datadogV1.SYNTHETICSASSERTIONTYPE_RESPONSE_TIME,
Target: 1000,
}},
},
Request: datadogV1.SyntheticsTestRequest{
Host: datadog.PtrString("grpcbin.test.k6.io"),
Port: datadog.PtrInt64(9000),
Service: datadog.PtrString("grpcbin.GRPCBin"),
Method: datadog.PtrString("Index"),
Message: datadog.PtrString("{}"),
CompressedJsonDescriptor: datadog.PtrString("eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g=="),
Metadata: map[string]string{},
CallType: datadogV1.SYNTHETICSTESTCALLTYPE_UNARY.Ptr(),
},
},
},
},
Locations: []string{
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-01-26T10:20:27.109Z
2024-02-14T09:56:55.385Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
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 is sent","request":{"method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"}]},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1706264427","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-1706264427","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}
{"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 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 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 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"}
form: {}
headers:
Accept:
Expand All @@ -12,9 +12,12 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/synthetics/tests/api
response:
body: '{"public_id":"izb-9gc-92w","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1706264427","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-01-26T10:20:27.717659+00:00","modified_at":"2024-01-26T10:20:27.717659+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
is sent","request":{"method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"79d-ysr-wwj"}]},"message":"BDD
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-1706264427","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":"Frog","handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":138446065,"org_id":569509,"modified_by":{"name":"Frog","handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}'
body: '{"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
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
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
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
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"},"deleted_at":null,"monitor_id":139518955,"org_id":321813,"modified_by":{"name":"CI
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"}}'
code: 200
duration: 0ms
headers:
Expand All @@ -23,7 +26,7 @@ interactions:
status: 200 OK
- request:
body: |
{"description":"","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1706264427","parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_public_id":"izb-9gc-92w","tags":[],"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}
{"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":""}}
form: {}
headers:
Accept:
Expand All @@ -34,7 +37,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/synthetics/variables
response:
body: '{"id":"a586a64d-cd9f-4983-8d00-81dcefb919ac","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1706264427","description":"","type":"variable","tags":[],"parse_test_public_id":"izb-9gc-92w","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":""}}
body: '{"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":""}}

'
code: 200
Expand All @@ -51,7 +54,7 @@ interactions:
- '*/*'
id: 2
method: DELETE
url: https://api.datadoghq.com/api/v1/synthetics/variables/a586a64d-cd9f-4983-8d00-81dcefb919ac
url: https://api.datadoghq.com/api/v1/synthetics/variables/b8daafc5-09e1-4f63-9f44-c973b2ec57dc
response:
body: ''
code: 200
Expand All @@ -62,7 +65,7 @@ interactions:
status: 200 OK
- request:
body: |
{"public_ids":["izb-9gc-92w"]}
{"public_ids":["6td-hmb-t6f"]}
form: {}
headers:
Accept:
Expand All @@ -73,7 +76,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/synthetics/tests/delete
response:
body: '{"deleted_tests":[{"public_id":"izb-9gc-92w","deleted_at":"2024-01-26T10:20:29.374347+00:00"}]}
body: '{"deleted_tests":[{"public_id":"6td-hmb-t6f","deleted_at":"2024-02-14T09:56:56.985642+00:00"}]}

'
code: 200
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-01-26T10:20:47.505Z
2024-02-14T09:52:43.647Z
Loading
Loading