diff --git a/checkly_test.go b/checkly_test.go index f513017..e1b5acf 100644 --- a/checkly_test.go +++ b/checkly_test.go @@ -72,6 +72,7 @@ var wantCheck = checkly.Check{ "foo", "bar", }, + SSLCheckDomain: "example.com", LocalSetupScript: "setitup", LocalTearDownScript: "tearitdown", AlertSettings: checkly.AlertSettings{ @@ -144,7 +145,9 @@ func validateEmptyBody(t *testing.T, body []byte) { func validateAnything(*testing.T, []byte) { } -var ignoreCheckFields = cmpopts.IgnoreFields(checkly.Check{}, "ID", "AlertChannelSubscriptions", "FrequencyOffset", "AlertSettings.SSLCertificates", "PrivateLocations") +// TODO: adjust wantCheck to test multiple SSLCheckDomain value and remove it from this list +var ignoreCheckFields = cmpopts.IgnoreFields(checkly.Check{}, "ID", "AlertChannelSubscriptions", "FrequencyOffset", + "AlertSettings.SSLCertificates", "PrivateLocations", "SSLCheckDomain") func TestAPIError(t *testing.T) { t.Parallel() diff --git a/demo/main.go b/demo/main.go index 5c1758a..6a3ec9e 100644 --- a/demo/main.go +++ b/demo/main.go @@ -107,16 +107,17 @@ var apiCheck = checkly.Check{ } var browserCheck = checkly.Check{ - Name: "My Browser Check", - Type: checkly.TypeBrowser, - Frequency: 10, - Activated: true, - Muted: false, - ShouldFail: false, - DoubleCheck: false, - SSLCheck: true, - Locations: []string{"eu-west-1"}, - AlertSettings: alertSettings, + Name: "My Browser Check", + Type: checkly.TypeBrowser, + Frequency: 10, + Activated: true, + Muted: false, + ShouldFail: false, + DoubleCheck: false, + SSLCheck: true, + SSLCheckDomain: "www.acme.com", + Locations: []string{"eu-west-1"}, + AlertSettings: alertSettings, Script: `const assert = require("chai").assert; const puppeteer = require("puppeteer"); diff --git a/types.go b/types.go index a76c577..34ee71c 100644 --- a/types.go +++ b/types.go @@ -446,6 +446,7 @@ type Check struct { EnvironmentVariables []EnvironmentVariable `json:"environmentVariables"` DoubleCheck bool `json:"doubleCheck"` Tags []string `json:"tags,omitempty"` + SSLCheckDomain string `json:"sslCheckDomain"` SetupSnippetID int64 `json:"setupSnippetId,omitempty"` TearDownSnippetID int64 `json:"tearDownSnippetId,omitempty"` LocalSetupScript string `json:"localSetupScript,omitempty"`