From c9458806c73b69e6af47eddd83391197b6d2a641 Mon Sep 17 00:00:00 2001 From: Andrew N Golovkov Date: Wed, 17 Jan 2018 16:55:18 +0200 Subject: merge changes from https://github.com/DreamItGetIT/statuscake/pull/24 to vendor directory --- statuscake/resource_statuscaketest.go | 6 +++--- statuscake/resource_statuscaketest_test.go | 6 +++--- vendor/github.com/DreamItGetIT/statuscake/responses.go | 2 +- vendor/github.com/DreamItGetIT/statuscake/tests.go | 2 +- vendor/vendor.json | 7 ++++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/statuscake/resource_statuscaketest.go b/statuscake/resource_statuscaketest.go index 187f711..459c71a 100644 --- a/statuscake/resource_statuscaketest.go +++ b/statuscake/resource_statuscaketest.go @@ -44,7 +44,7 @@ func resourceStatusCakeTest() *schema.Resource { }, "contact_id": { - Type: schema.TypeString, + Type: schema.TypeInt, Optional: true, }, @@ -214,7 +214,7 @@ func CreateTest(d *schema.ResourceData, meta interface{}) error { TestType: d.Get("test_type").(string), Paused: d.Get("paused").(bool), Timeout: d.Get("timeout").(int), - ContactID: d.Get("contact_id").(string), + ContactID: d.Get("contact_id").(int), Confirmation: d.Get("confirmations").(int), Port: d.Get("port").(int), TriggerRate: d.Get("trigger_rate").(int), @@ -353,7 +353,7 @@ func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test { test.CheckRate = v.(int) } if v, ok := d.GetOk("contact_id"); ok { - test.ContactID = v.(string) + test.ContactID = v.(int) } if v, ok := d.GetOk("test_type"); ok { test.TestType = v.(string) diff --git a/statuscake/resource_statuscaketest_test.go b/statuscake/resource_statuscaketest_test.go index 99acd04..b727e92 100644 --- a/statuscake/resource_statuscaketest_test.go +++ b/statuscake/resource_statuscaketest_test.go @@ -162,7 +162,7 @@ func testAccTestCheckAttributes(rn string, test *statuscake.Test) resource.TestC case "timeout": err = check(key, value, strconv.Itoa(test.Timeout)) case "contact_id": - err = check(key, value, test.ContactID) + err = check(key, value, strconv.Itoa(test.ContactID)) case "confirmations": err = check(key, value, strconv.Itoa(test.Confirmation)) case "trigger_rate": @@ -240,7 +240,7 @@ resource "statuscake_test" "google" { test_type = "HTTP" check_rate = 300 timeout = 10 - contact_id = "43402" + contact_id = 43402 confirmations = 1 trigger_rate = 10 } @@ -284,7 +284,7 @@ resource "statuscake_test" "google" { test_type = "TCP" check_rate = 300 timeout = 10 - contact_id = "43402" + contact_id = 43402 confirmations = 1 port = 80 } diff --git a/vendor/github.com/DreamItGetIT/statuscake/responses.go b/vendor/github.com/DreamItGetIT/statuscake/responses.go index 9cdcb11..3cbf36d 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/responses.go +++ b/vendor/github.com/DreamItGetIT/statuscake/responses.go @@ -28,7 +28,7 @@ type detailResponse struct { Paused bool `json:"Paused"` WebsiteName string `json:"WebsiteName"` URI string `json:"URI"` - ContactID string `json:"ContactID"` + ContactID int `json:"ContactID"` Status string `json:"Status"` Uptime float64 `json:"Uptime"` CustomHeader string `json:"CustomHeader"` diff --git a/vendor/github.com/DreamItGetIT/statuscake/tests.go b/vendor/github.com/DreamItGetIT/statuscake/tests.go index 1b37fa1..a41b0bd 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/tests.go +++ b/vendor/github.com/DreamItGetIT/statuscake/tests.go @@ -34,7 +34,7 @@ type Test struct { Port int `json:"Port" querystring:"Port"` // Contact group ID - will return int of contact group used else 0 - ContactID string `json:"ContactID" querystring:"ContactGroup"` + ContactID int `json:"ContactID" querystring:"ContactGroup"` // Current status at last test Status string `json:"Status"` diff --git a/vendor/vendor.json b/vendor/vendor.json index 921131f..d2bc87c 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -3,10 +3,11 @@ "ignore": "appengine test github.com/hashicorp/nomad/ github.com/hashicorp/terraform/backend", "package": [ { - "checksumSHA1": "xjfJ6T+mQFmC9oMR+UKdGtbs/p4=", + "checksumSHA1": "6Fo7YzTT+MDviHOsqg6dNw8WrV4=", + "origin": "github.com/matschaffer/statuscake", "path": "github.com/DreamItGetIT/statuscake", - "revision": "2081e16dbe691bccf20b1901897d8f8245beefcd", - "revisionTime": "2018-01-09T18:02:45Z" + "revision": "24c596002b80d84cf3bfb0f714e880c1b2e9af16", + "revisionTime": "2018-01-16T08:09:52Z" }, { "checksumSHA1": "FIL83loX9V9APvGQIjJpbxq53F0=", -- cgit v1.2.3