aboutsummaryrefslogtreecommitdiffhomepage
path: root/statuscake
diff options
context:
space:
mode:
Diffstat (limited to 'statuscake')
-rw-r--r--statuscake/resource_statuscaketest.go9
-rw-r--r--statuscake/resource_statuscaketest_test.go4
2 files changed, 8 insertions, 5 deletions
diff --git a/statuscake/resource_statuscaketest.go b/statuscake/resource_statuscaketest.go
index d7d3f36..866cdce 100644
--- a/statuscake/resource_statuscaketest.go
+++ b/statuscake/resource_statuscaketest.go
@@ -94,6 +94,7 @@ func resourceStatusCakeTest() *schema.Resource {
94 Optional: true, 94 Optional: true,
95 Default: 5, 95 Default: 5,
96 }, 96 },
97
97 "custom_header": { 98 "custom_header": {
98 Type: schema.TypeString, 99 Type: schema.TypeString,
99 Optional: true, 100 Optional: true,
@@ -178,8 +179,10 @@ func resourceStatusCakeTest() *schema.Resource {
178 }, 179 },
179 180
180 "test_tags": { 181 "test_tags": {
181 Type: schema.TypeString, 182 Type: schema.TypeSet,
183 Elem: &schema.Schema{Type: schema.TypeString},
182 Optional: true, 184 Optional: true,
185 Set: schema.HashString,
183 }, 186 },
184 187
185 "status_codes": { 188 "status_codes": {
@@ -240,7 +243,7 @@ func CreateTest(d *schema.ResourceData, meta interface{}) error {
240 FindString: d.Get("find_string").(string), 243 FindString: d.Get("find_string").(string),
241 DoNotFind: d.Get("do_not_find").(bool), 244 DoNotFind: d.Get("do_not_find").(bool),
242 RealBrowser: d.Get("real_browser").(int), 245 RealBrowser: d.Get("real_browser").(int),
243 TestTags: d.Get("test_tags").(string), 246 TestTags: castSetToSliceStrings(d.Get("test_tags").(*schema.Set).List()),
244 StatusCodes: d.Get("status_codes").(string), 247 StatusCodes: d.Get("status_codes").(string),
245 UseJar: d.Get("use_jar").(int), 248 UseJar: d.Get("use_jar").(int),
246 PostRaw: d.Get("post_raw").(string), 249 PostRaw: d.Get("post_raw").(string),
@@ -417,7 +420,7 @@ func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test {
417 test.RealBrowser = v.(int) 420 test.RealBrowser = v.(int)
418 } 421 }
419 if v, ok := d.GetOk("test_tags"); ok { 422 if v, ok := d.GetOk("test_tags"); ok {
420 test.TestTags = v.(string) 423 test.TestTags = castSetToSliceStrings(v.(*schema.Set).List())
421 } 424 }
422 if v, ok := d.GetOk("status_codes"); ok { 425 if v, ok := d.GetOk("status_codes"); ok {
423 test.StatusCodes = v.(string) 426 test.StatusCodes = v.(string)
diff --git a/statuscake/resource_statuscaketest_test.go b/statuscake/resource_statuscaketest_test.go
index 8bcbb36..c10b5d3 100644
--- a/statuscake/resource_statuscaketest_test.go
+++ b/statuscake/resource_statuscaketest_test.go
@@ -91,7 +91,7 @@ func TestAccStatusCake_withUpdate(t *testing.T) {
91 resource.TestCheckResourceAttr("statuscake_test.google", "find_string", "string15212"), 91 resource.TestCheckResourceAttr("statuscake_test.google", "find_string", "string15212"),
92 resource.TestCheckResourceAttr("statuscake_test.google", "do_not_find", "false"), 92 resource.TestCheckResourceAttr("statuscake_test.google", "do_not_find", "false"),
93 resource.TestCheckResourceAttr("statuscake_test.google", "real_browser", "1"), 93 resource.TestCheckResourceAttr("statuscake_test.google", "real_browser", "1"),
94 resource.TestCheckResourceAttr("statuscake_test.google", "test_tags", "string8191"), 94 resource.TestCheckResourceAttr("statuscake_test.google", "test_tags.#", "1"),
95 resource.TestCheckResourceAttr("statuscake_test.google", "status_codes", "string23065"), 95 resource.TestCheckResourceAttr("statuscake_test.google", "status_codes", "string23065"),
96 resource.TestCheckResourceAttr("statuscake_test.google", "use_jar", "1"), 96 resource.TestCheckResourceAttr("statuscake_test.google", "use_jar", "1"),
97 resource.TestCheckResourceAttr("statuscake_test.google", "post_raw", "string32096"), 97 resource.TestCheckResourceAttr("statuscake_test.google", "post_raw", "string32096"),
@@ -261,7 +261,7 @@ resource "statuscake_test" "google" {
261 find_string = "string15212" 261 find_string = "string15212"
262 do_not_find = false 262 do_not_find = false
263 real_browser = 1 263 real_browser = 1
264 test_tags = "string8191" 264 test_tags = ["string8191"]
265 status_codes = "string23065" 265 status_codes = "string23065"
266 use_jar = 1 266 use_jar = 1
267 post_raw = "string32096" 267 post_raw = "string32096"