]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/DreamItGetIT/statuscake/tests.go
Update github.com/DreamItGetIT/statuscake to PR-28
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / DreamItGetIT / statuscake / tests.go
index a41b0bd78576b326983d1fdda3e1d0c13eccfa96..b003d4cb1478f0736e4bbf7f9726f9fb9cb5cff3 100644 (file)
@@ -12,7 +12,7 @@ const queryStringTag = "querystring"
 
 // Test represents a statuscake Test
 type Test struct {
-       // ThiTestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update
+       // TestID is an int, use this to get more details about this test. If not provided will insert a new check, else will update
        TestID int `json:"TestID" querystring:"TestID" querystringoptions:"omitempty"`
 
        // Sent tfalse To Unpause and true To Pause.
@@ -33,8 +33,11 @@ type Test struct {
        // A Port to use on TCP Tests
        Port int `json:"Port" querystring:"Port"`
 
-       // Contact group ID - will return int of contact group used else 0
-       ContactID int `json:"ContactID" querystring:"ContactGroup"`
+       // Contact group ID - deprecated in favor of ContactGroup but still provided in the API detail response
+       ContactID int `json:"ContactID"`
+
+       // Contact group IDs - will return list of ints or empty if not provided
+       ContactGroup []string `json:"ContactGroup" querystring:"ContactGroup"`
 
        // Current status at last test
        Status string `json:"Status"`
@@ -93,7 +96,7 @@ type Test struct {
        TriggerRate int `json:"TriggerRate" querystring:"TriggerRate"`
 
        // Tags should be seperated by a comma - no spacing between tags (this,is,a set,of,tags)
-       TestTags string `json:"TestTags" querystring:"TestTags"`
+       TestTags []string `json:"TestTags" querystring:"TestTags"`
 
        // Comma Seperated List of StatusCodes to Trigger Error on (on Update will replace, so send full list each time)
        StatusCodes string `json:"StatusCodes" querystring:"StatusCodes"`
@@ -283,7 +286,7 @@ func (tt *tests) Update(t *Test) (*Test, error) {
        }
 
        if !ur.Success {
-               return nil, &updateError{Issues: ur.Issues}
+               return nil, &updateError{Issues: ur.Issues, Message: ur.Message}
        }
 
        t2 := *t