diff options
author | stack72 <public@paulstack.co.uk> | 2015-10-08 08:52:15 +0100 |
---|---|---|
committer | stack72 <public@paulstack.co.uk> | 2015-11-27 15:03:13 +0000 |
commit | 32574941630dadbe86b887c174e1b7bcfd9580c1 (patch) | |
tree | 26762d3545d4e9a58ddb649964682daf8ac92642 /resource_statuscaketest.go | |
parent | 7dec75fcd796fa25f655c1f1cda2d202f117eb4b (diff) | |
download | terraform-provider-statuscake-32574941630dadbe86b887c174e1b7bcfd9580c1.tar.gz terraform-provider-statuscake-32574941630dadbe86b887c174e1b7bcfd9580c1.tar.zst terraform-provider-statuscake-32574941630dadbe86b887c174e1b7bcfd9580c1.zip |
Migrating the statuscake_test resource to use the new version of the statuscake client
Diffstat (limited to 'resource_statuscaketest.go')
-rw-r--r-- | resource_statuscaketest.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resource_statuscaketest.go b/resource_statuscaketest.go index 6834135..17488a5 100644 --- a/resource_statuscaketest.go +++ b/resource_statuscaketest.go | |||
@@ -69,7 +69,7 @@ func CreateTest(d *schema.ResourceData, meta interface{}) error { | |||
69 | 69 | ||
70 | log.Printf("[DEBUG] Creating new StatusCake Test: %s", d.Get("website_name").(string)) | 70 | log.Printf("[DEBUG] Creating new StatusCake Test: %s", d.Get("website_name").(string)) |
71 | 71 | ||
72 | response, err := client.Tests().Put(newTest) | 72 | response, err := client.Tests().Update(newTest) |
73 | if err != nil { | 73 | if err != nil { |
74 | return fmt.Errorf("Error creating StatusCake Test: %s", err.Error()) | 74 | return fmt.Errorf("Error creating StatusCake Test: %s", err.Error()) |
75 | } | 75 | } |
@@ -86,7 +86,7 @@ func UpdateTest(d *schema.ResourceData, meta interface{}) error { | |||
86 | params := getStatusCakeTestInput(d) | 86 | params := getStatusCakeTestInput(d) |
87 | 87 | ||
88 | log.Printf("[DEBUG] StatusCake Test Update for %s", d.Id()) | 88 | log.Printf("[DEBUG] StatusCake Test Update for %s", d.Id()) |
89 | _, err := client.Tests().Put(params) | 89 | _, err := client.Tests().Update(params) |
90 | if err != nil { | 90 | if err != nil { |
91 | return fmt.Errorf("Error Updating StatusCake Test: %s", err.Error()) | 91 | return fmt.Errorf("Error Updating StatusCake Test: %s", err.Error()) |
92 | } | 92 | } |
@@ -116,7 +116,7 @@ func ReadTest(d *schema.ResourceData, meta interface{}) error { | |||
116 | if parseErr != nil { | 116 | if parseErr != nil { |
117 | return parseErr | 117 | return parseErr |
118 | } | 118 | } |
119 | testResp, err := client.Tests().Details(testId) | 119 | testResp, err := client.Tests().Detail(testId) |
120 | if err != nil { | 120 | if err != nil { |
121 | return fmt.Errorf("Error Getting StatusCake Test Details for %s: Error: %s", d.Id(), err) | 121 | return fmt.Errorf("Error Getting StatusCake Test Details for %s: Error: %s", d.Id(), err) |
122 | } | 122 | } |