Skip to content
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": "2025-06-05 09:49:40.724881",
"spec_repo_commit": "faa72400"
"regenerated": "2025-06-06 09:05:57.050790",
"spec_repo_commit": "14586db5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-05 09:49:40.740637",
"spec_repo_commit": "faa72400"
"regenerated": "2025-06-06 09:05:57.067750",
"spec_repo_commit": "14586db5"
}
}
}
18 changes: 18 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14107,11 +14107,23 @@ components:
enum:
- http
- grpc
- ssl
- dns
- tcp
- udp
- icmp
- websocket
example: http
type: string
x-enum-varnames:
- HTTP
- GRPC
- SSL
- DNS
- TCP
- UDP
- ICMP
- WEBSOCKET
SyntheticsAPITestType:
default: api
description: Type of the Synthetic test, `api`.
Expand Down Expand Up @@ -17177,6 +17189,9 @@ components:
example: ''
type: string
type: array
checkCertificateRevocation:
description: Check for certificate revocation.
type: boolean
compressedJsonDescriptor:
description: A protobuf JSON descriptor that needs to be gzipped first then
base64 encoded.
Expand Down Expand Up @@ -17206,6 +17221,9 @@ components:
type: string
httpVersion:
$ref: '#/components/schemas/SyntheticsTestOptionsHTTPVersion'
isMessageBase64Encoded:
description: Whether the message is base64 encoded.
type: boolean
message:
description: Message to send for UDP or WebSocket tests.
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2025-02-25T16:34:23.928Z"
"2025-06-02T14:06:04.761Z"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2025-02-25T16:34:26.775Z"
"2025-06-02T14:05:42.416Z"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2025-02-25T16:34:29.813Z"
"2025-06-02T14:03:51.685Z"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2025-02-25T16:34:32.557Z"
"2025-06-02T13:54:14.928Z"

Large diffs are not rendered by default.

142 changes: 142 additions & 0 deletions examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,148 @@ const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
callType: "unary",
},
},
{
name: "SSL step",
subtype: "ssl",
allowFailure: false,
isCritical: true,
retry: {
count: 0,
interval: 300,
},
assertions: [
{
operator: "isInMoreThan",
type: "certificate",
target: 10,
},
],
request: {
checkCertificateRevocation: true,
host: "example.org",
port: 443,
},
},
{
name: "DNS step",
subtype: "dns",
allowFailure: false,
isCritical: true,
retry: {
count: 0,
interval: 300,
},
assertions: [
{
operator: "lessThan",
type: "responseTime",
target: 1000,
},
],
request: {
host: "troisdizaines.com",
dnsServer: "8.8.8.8",
dnsServerPort: "53",
},
},
{
name: "TCP step",
subtype: "tcp",
allowFailure: false,
isCritical: true,
retry: {
count: 0,
interval: 300,
},
assertions: [
{
operator: "lessThan",
type: "responseTime",
target: 1000,
},
],
request: {
host: "34.95.79.70",
port: 80,
shouldTrackHops: true,
timeout: 32,
},
},
{
name: "ICMP step",
subtype: "icmp",
allowFailure: false,
isCritical: true,
retry: {
count: 0,
interval: 300,
},
assertions: [
{
operator: "is",
target: 0,
type: "packetLossPercentage",
},
],
request: {
host: "34.95.79.70",
numberOfPackets: 4,
shouldTrackHops: true,
timeout: 38,
},
},
{
name: "Websocket step",
subtype: "websocket",
allowFailure: false,
isCritical: true,
retry: {
count: 0,
interval: 300,
},
assertions: [
{
operator: "lessThan",
type: "responseTime",
target: 1000,
},
],
request: {
url: "ws://34.95.79.70/web-socket",
message: "My message",
isMessageBase64Encoded: true,
headers: {
f: "g",
},
basicAuth: {
type: "web",
username: "user",
password: "password",
},
},
},
{
name: "UDP step",
subtype: "udp",
allowFailure: false,
isCritical: true,
retry: {
count: 0,
interval: 300,
},
assertions: [
{
operator: "lessThan",
type: "responseTime",
target: 1000,
},
],
request: {
host: "8.8.8.8",
port: 53,
message: "A image.google.com",
},
},
],
},
locations: ["aws:us-east-2"],
Expand Down
2 changes: 1 addition & 1 deletion features/v1/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
"parameters": [
{
"name": "body",
"value": "{\n \"config\": {\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"exitIfSucceed\": true,\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\",\n \"secure\": true\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"httpVersion\": \"http2\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\",\n \"extractedValuesFromScript\": \"dd.variable.set('STATUS_CODE', dd.response.statusCode);\"\n },\n {\n \"name\": \"Wait\",\n \"subtype\": \"wait\",\n \"value\": 1\n },\n {\n \"name\": \"GRPC CALL\",\n \"subtype\": \"grpc\",\n \"extractedValues\": [],\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"host\": \"grpcbin.test.k6.io\",\n \"port\": 9000,\n \"service\": \"grpcbin.GRPCBin\",\n \"method\": \"Index\",\n \"message\": \"{}\",\n \"compressedJsonDescriptor\": \"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==\",\n \"metadata\": {},\n \"callType\": \"unary\"\n }\n }\n ]\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 1000 },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n"
"value": "{\n \"config\": {\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"steps\": [\n {\n \"allowFailure\": true,\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"type\": \"statusCode\",\n \"target\": 200\n }\n ],\n \"exitIfSucceed\": true,\n \"extractedValues\": [\n {\n \"field\": \"server\",\n \"name\": \"EXTRACTED_VALUE\",\n \"parser\": {\n \"type\": \"raw\"\n },\n \"type\": \"http_header\",\n \"secure\": true\n }\n ],\n \"isCritical\": true,\n \"name\": \"request is sent\",\n \"request\": {\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"httpVersion\": \"http2\"\n },\n \"retry\": {\n \"count\": 5,\n \"interval\": 1000\n },\n \"subtype\": \"http\",\n \"extractedValuesFromScript\": \"dd.variable.set('STATUS_CODE', dd.response.statusCode);\"\n },\n {\n \"name\": \"Wait\",\n \"subtype\": \"wait\",\n \"value\": 1\n },\n {\n \"name\": \"GRPC CALL\",\n \"subtype\": \"grpc\",\n \"extractedValues\": [],\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"host\": \"grpcbin.test.k6.io\",\n \"port\": 9000,\n \"service\": \"grpcbin.GRPCBin\",\n \"method\": \"Index\",\n \"message\": \"{}\",\n \"compressedJsonDescriptor\": \"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==\",\n \"metadata\": {},\n \"callType\": \"unary\"\n }\n },\n {\n \"name\": \"SSL step\",\n \"subtype\": \"ssl\",\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"isInMoreThan\",\n \"type\": \"certificate\",\n \"target\": 10\n }\n ],\n \"request\": {\n \"checkCertificateRevocation\": true,\n \"host\": \"example.org\",\n \"port\": 443\n }\n },\n {\n \"name\": \"DNS step\",\n \"subtype\": \"dns\",\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"host\": \"troisdizaines.com\",\n \"dnsServer\": \"8.8.8.8\",\n \"dnsServerPort\": \"53\"\n }\n },\n {\n \"name\": \"TCP step\",\n \"subtype\": \"tcp\",\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"host\": \"34.95.79.70\",\n \"port\": 80,\n \"shouldTrackHops\": true,\n \"timeout\": 32\n }\n },\n {\n \"name\": \"ICMP step\",\n \"subtype\": \"icmp\",\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"target\": 0,\n \"type\": \"packetLossPercentage\"\n }\n ],\n \"request\": {\n \"host\": \"34.95.79.70\",\n \"numberOfPackets\": 4,\n \"shouldTrackHops\": true,\n \"timeout\": 38\n }\n },\n {\n \"name\": \"Websocket step\",\n \"subtype\": \"websocket\",\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"url\": \"ws://34.95.79.70/web-socket\",\n \"message\": \"My message\",\n \"isMessageBase64Encoded\": true,\n \"headers\": {\n \"f\": \"g\"\n },\n \"basicAuth\": {\n \"type\": \"web\",\n \"username\": \"user\",\n \"password\": \"password\"\n }\n }\n },\n {\n \"name\": \"UDP step\",\n \"subtype\": \"udp\",\n \"allowFailure\": false,\n \"isCritical\": true,\n \"retry\": {\n \"count\": 0,\n \"interval\": 300\n },\n \"assertions\": [\n {\n \"operator\": \"lessThan\",\n \"type\": \"responseTime\",\n \"target\": 1000\n }\n ],\n \"request\": {\n \"host\": \"8.8.8.8\",\n \"port\": 53,\n \"message\": \"A image.google.com\"\n }\n }\n ]\n },\n \"locations\": [\n \"aws:us-east-2\"\n ],\n \"message\": \"BDD test payload: synthetics_api_test_multi_step_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": {\n \"count\": 3,\n \"interval\": 1000\n },\n \"tick_every\": 60\n },\n \"subtype\": \"multi\",\n \"tags\": [\n \"testing:api\"\n ],\n \"type\": \"api\"\n}"
}
],
"step": "there is a valid \"synthetics_api_test_multi_step\" in the system",
Expand Down
21 changes: 20 additions & 1 deletion features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,26 @@ Feature: Synthetics
And the response "config.steps[1].subtype" is equal to "wait"
And the response "config.steps[1].value" is equal to 1
And the response "config.steps[2].request.host" is equal to "grpcbin.test.k6.io"
And the response "config.steps[2].request.host" is equal to "grpcbin.test.k6.io"
And the response "config.steps[3].subtype" is equal to "ssl"
And the response "config.steps[3].request.host" is equal to "example.org"
And the response "config.steps[3].request.port" is equal to 443
And the response "config.steps[3].request.checkCertificateRevocation" is equal to true
And the response "config.steps[4].subtype" is equal to "dns"
And the response "config.steps[4].request.host" is equal to "troisdizaines.com"
And the response "config.steps[4].request.dnsServer" is equal to "8.8.8.8"
And the response "config.steps[4].request.dnsServerPort" is equal to "53"
And the response "config.steps[5].subtype" is equal to "tcp"
And the response "config.steps[5].request.host" is equal to "34.95.79.70"
And the response "config.steps[5].request.shouldTrackHops" is equal to true
And the response "config.steps[6].subtype" is equal to "icmp"
And the response "config.steps[6].request.host" is equal to "34.95.79.70"
And the response "config.steps[6].request.numberOfPackets" is equal to 4
And the response "config.steps[7].subtype" is equal to "websocket"
And the response "config.steps[7].request.url" is equal to "ws://34.95.79.70/web-socket"
And the response "config.steps[7].request.message" is equal to "My message"
And the response "config.steps[7].request.isMessageBase64Encoded" is equal to true
And the response "config.steps[8].subtype" is equal to "udp"
And the response "config.steps[8].request.host" is equal to "8.8.8.8"

@generated @skip @team:DataDog/synthetics-ct
Scenario: Delete a global variable returns "JSON format is wrong" response
Expand Down
Loading