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

feat: add new ip family field to the types [sc-20606] #120

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
9 changes: 9 additions & 0 deletions checkly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var wantCheck = checkly.Check{
Username: "",
Password: "",
},
IPFamily: "IPv4",
},
Script: "foo",
EnvironmentVariables: []checkly.EnvironmentVariable{
Expand All @@ -86,6 +87,10 @@ var wantCheck = checkly.Check{
Reminders: checkly.Reminders{
Interval: 5,
},
ParallelRunFailureThreshold: checkly.ParallelRunFailureThreshold{
Enabled: false,
Percentage: 10,
},
},
UseGlobalAlertSettings: false,
DegradedResponseTime: 15000,
Expand Down Expand Up @@ -378,6 +383,10 @@ var wantGroup = checkly.Group{
Amount: 0,
Interval: 5,
},
ParallelRunFailureThreshold: checkly.ParallelRunFailureThreshold{
Enabled: false,
Percentage: 10,
},
},
AlertChannelSubscriptions: []checkly.AlertChannelSubscription{
{
Expand Down
7 changes: 6 additions & 1 deletion fixtures/CreateCheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"basicAuth": {
"password": "",
"username": ""
}
},
"ipFamily": "IPv4"
},
"frequency": 10,
"muted": false,
Expand Down Expand Up @@ -62,6 +63,10 @@
"reminders": {
"amount": 0,
"interval": 5
},
"parallelRunFailureThreshold": {
"enabled": false,
"percentage": 10
}
},
"script": "foo",
Expand Down
4 changes: 4 additions & 0 deletions fixtures/CreateGroup.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
"reminders": {
"amount": 0,
"interval": 5
},
"parallelRunFailureThreshold": {
"enabled": false,
"percentage": 10
}
},
"alertChannelSubscriptions": [
Expand Down
7 changes: 6 additions & 1 deletion fixtures/GetCheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"basicAuth": {
"password": "",
"username": ""
}
},
"ipFamily": "IPv4"
},
"frequency": 10,
"muted": false,
Expand Down Expand Up @@ -62,6 +63,10 @@
"reminders": {
"amount": 0,
"interval": 5
},
"parallelRunFailureThreshold": {
"enabled": false,
"percentage": 10
}
},
"script": "foo",
Expand Down
7 changes: 6 additions & 1 deletion fixtures/UpdateCheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"basicAuth": {
"password": "",
"username": ""
}
},
"ipFamily": "IPv4"
},
"frequency": 10,
"muted": false,
Expand Down Expand Up @@ -62,6 +63,10 @@
"reminders": {
"amount": 0,
"interval": 5
},
"parallelRunFailureThreshold": {
"enabled": false,
"percentage": 10
}
},
"script": "foo",
Expand Down
4 changes: 4 additions & 0 deletions fixtures/UpdateGroup.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"amount": 0,
"interval": 5
},
"parallelRunFailureThreshold": {
"enabled": false,
"percentage": 10
},
"escalationType": "RUN_BASED",
"runBasedEscalation": {
"failedRunThreshold": 1
Expand Down
7 changes: 4 additions & 3 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ type Request struct {
QueryParameters []KeyValue `json:"queryParameters"`
Assertions []Assertion `json:"assertions"`
BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
IPFamily string `json:"ipFamily,omitempty"`
}

// Assertion represents an assertion about an API response, which will be
Expand Down Expand Up @@ -605,14 +606,14 @@ type AlertSettings struct {
Reminders Reminders `json:"reminders,omitempty"`
ParallelRunFailureThreshold ParallelRunFailureThreshold `json:"parallelRunFailureThreshold,omitempty"`
// Deprecated: this property will be removed in future versions.
SSLCertificates SSLCertificates `json:"sslCertificates,omitempty"`
SSLCertificates SSLCertificates `json:"sslCertificates,omitempty"`
}

// ParallelRunFailureThreshold represent an alert escalation based on the number
// of failing regions, only applicable for parallel checks
type ParallelRunFailureThreshold struct {
Enabled bool `json:"enabled,omitempty"`
Percentage int `json:"percentage,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Percentage int `json:"percentage,omitempty"`
}

// RunBasedEscalation represents an alert escalation based on a number of failed
Expand Down
Loading