aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLee Johnson <leejohnson@ijoinsolutions.com>2016-11-29 15:27:04 -0500
committerLee Johnson <leejohnson@ijoinsolutions.com>2016-11-29 15:27:04 -0500
commit2f15340f09a2a9dd12f9a47c009b9743e0d2f2db (patch)
treebd2ea5a5da08a7147019fa7dd08d184b3128b8e4
parente7b04dd5bb4a5947d1f4e9049ec90032b62faa5e (diff)
parent516886070835127727defe348567a0edfa138528 (diff)
downloadterraform-provider-statuscake-2f15340f09a2a9dd12f9a47c009b9743e0d2f2db.tar.gz
terraform-provider-statuscake-2f15340f09a2a9dd12f9a47c009b9743e0d2f2db.tar.zst
terraform-provider-statuscake-2f15340f09a2a9dd12f9a47c009b9743e0d2f2db.zip
Merge remote-tracking branch 'origin/master' into statuscake_adding_contact_group
-rw-r--r--resource_statuscaketest.go7
-rw-r--r--resource_statuscaketest_test.go21
2 files changed, 19 insertions, 9 deletions
diff --git a/resource_statuscaketest.go b/resource_statuscaketest.go
index d403848..389a7d6 100644
--- a/resource_statuscaketest.go
+++ b/resource_statuscaketest.go
@@ -58,6 +58,10 @@ func resourceStatusCakeTest() *schema.Resource {
58 Type: schema.TypeInt, 58 Type: schema.TypeInt,
59 Computed: true, 59 Computed: true,
60 }, 60 },
61 "contact_id": &schema.Schema{
62 Type: schema.TypeInt,
63 Optional: true,
64 },
61 }, 65 },
62 } 66 }
63} 67}
@@ -160,5 +164,8 @@ func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test {
160 if v, ok := d.GetOk("timeout"); ok { 164 if v, ok := d.GetOk("timeout"); ok {
161 test.Timeout = v.(int) 165 test.Timeout = v.(int)
162 } 166 }
167 if v, ok := d.GetOk("contact_id"); ok {
168 test.ContactID = v.(int)
169 }
163 return test 170 return test
164} 171}
diff --git a/resource_statuscaketest_test.go b/resource_statuscaketest_test.go
index 4123ac6..236b790 100644
--- a/resource_statuscaketest_test.go
+++ b/resource_statuscaketest_test.go
@@ -63,6 +63,7 @@ func TestAccStatusCake_withUpdate(t *testing.T) {
63 testAccTestCheckExists("statuscake_test.google", &test), 63 testAccTestCheckExists("statuscake_test.google", &test),
64 resource.TestCheckResourceAttr("statuscake_test.google", "check_rate", "500"), 64 resource.TestCheckResourceAttr("statuscake_test.google", "check_rate", "500"),
65 resource.TestCheckResourceAttr("statuscake_test.google", "paused", "true"), 65 resource.TestCheckResourceAttr("statuscake_test.google", "paused", "true"),
66 resource.TestCheckResourceAttr("statuscake_test.google", "contact_id", "23456"),
66 ), 67 ),
67 }, 68 },
68 }, 69 },
@@ -162,20 +163,22 @@ func testAccTestCheckDestroy(test *statuscake.Test) resource.TestCheckFunc {
162 163
163const testAccTestConfig_basic = ` 164const testAccTestConfig_basic = `
164resource "statuscake_test" "google" { 165resource "statuscake_test" "google" {
165 website_name = "google.com" 166 website_name = "google.com"
166 website_url = "www.google.com" 167 website_url = "www.google.com"
167 test_type = "HTTP" 168 test_type = "HTTP"
168 check_rate = 300 169 check_rate = 300
170 contact_id = 12345
169} 171}
170` 172`
171 173
172const testAccTestConfig_update = ` 174const testAccTestConfig_update = `
173resource "statuscake_test" "google" { 175resource "statuscake_test" "google" {
174 website_name = "google.com" 176 website_name = "google.com"
175 website_url = "www.google.com" 177 website_url = "www.google.com"
176 test_type = "HTTP" 178 test_type = "HTTP"
177 check_rate = 500 179 check_rate = 500
178 paused = true 180 paused = true
181 contact_id = 23456
179} 182}
180` 183`
181 184