diff options
Diffstat (limited to 'resource_statuscaketest.go')
-rw-r--r-- | resource_statuscaketest.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/resource_statuscaketest.go b/resource_statuscaketest.go index 17488a5..7f5ff67 100644 --- a/resource_statuscaketest.go +++ b/resource_statuscaketest.go | |||
@@ -6,7 +6,7 @@ import ( | |||
6 | 6 | ||
7 | "log" | 7 | "log" |
8 | 8 | ||
9 | wtf "github.com/DreamItGetIT/statuscake" | 9 | "github.com/DreamItGetIT/statuscake" |
10 | "github.com/hashicorp/terraform/helper/schema" | 10 | "github.com/hashicorp/terraform/helper/schema" |
11 | ) | 11 | ) |
12 | 12 | ||
@@ -58,9 +58,9 @@ func resourceStatusCakeTest() *schema.Resource { | |||
58 | } | 58 | } |
59 | 59 | ||
60 | func CreateTest(d *schema.ResourceData, meta interface{}) error { | 60 | func CreateTest(d *schema.ResourceData, meta interface{}) error { |
61 | client := meta.(*wtf.Client) | 61 | client := meta.(*statuscake.Client) |
62 | 62 | ||
63 | newTest := &wtf.Test{ | 63 | newTest := &statuscake.Test{ |
64 | WebsiteName: d.Get("website_name").(string), | 64 | WebsiteName: d.Get("website_name").(string), |
65 | WebsiteURL: d.Get("website_url").(string), | 65 | WebsiteURL: d.Get("website_url").(string), |
66 | TestType: d.Get("test_type").(string), | 66 | TestType: d.Get("test_type").(string), |
@@ -81,7 +81,7 @@ func CreateTest(d *schema.ResourceData, meta interface{}) error { | |||
81 | } | 81 | } |
82 | 82 | ||
83 | func UpdateTest(d *schema.ResourceData, meta interface{}) error { | 83 | func UpdateTest(d *schema.ResourceData, meta interface{}) error { |
84 | client := meta.(*wtf.Client) | 84 | client := meta.(*statuscake.Client) |
85 | 85 | ||
86 | params := getStatusCakeTestInput(d) | 86 | params := getStatusCakeTestInput(d) |
87 | 87 | ||
@@ -94,7 +94,7 @@ func UpdateTest(d *schema.ResourceData, meta interface{}) error { | |||
94 | } | 94 | } |
95 | 95 | ||
96 | func DeleteTest(d *schema.ResourceData, meta interface{}) error { | 96 | func DeleteTest(d *schema.ResourceData, meta interface{}) error { |
97 | client := meta.(*wtf.Client) | 97 | client := meta.(*statuscake.Client) |
98 | 98 | ||
99 | testId, parseErr := strconv.Atoi(d.Id()) | 99 | testId, parseErr := strconv.Atoi(d.Id()) |
100 | if parseErr != nil { | 100 | if parseErr != nil { |
@@ -110,7 +110,7 @@ func DeleteTest(d *schema.ResourceData, meta interface{}) error { | |||
110 | } | 110 | } |
111 | 111 | ||
112 | func ReadTest(d *schema.ResourceData, meta interface{}) error { | 112 | func ReadTest(d *schema.ResourceData, meta interface{}) error { |
113 | client := meta.(*wtf.Client) | 113 | client := meta.(*statuscake.Client) |
114 | 114 | ||
115 | testId, parseErr := strconv.Atoi(d.Id()) | 115 | testId, parseErr := strconv.Atoi(d.Id()) |
116 | if parseErr != nil { | 116 | if parseErr != nil { |
@@ -125,12 +125,12 @@ func ReadTest(d *schema.ResourceData, meta interface{}) error { | |||
125 | return nil | 125 | return nil |
126 | } | 126 | } |
127 | 127 | ||
128 | func getStatusCakeTestInput(d *schema.ResourceData) *wtf.Test { | 128 | func getStatusCakeTestInput(d *schema.ResourceData) *statuscake.Test { |
129 | testId, parseErr := strconv.Atoi(d.Id()) | 129 | testId, parseErr := strconv.Atoi(d.Id()) |
130 | if parseErr != nil { | 130 | if parseErr != nil { |
131 | log.Printf("[DEBUG] Error Parsing StatusCake TestID: %s", d.Id()) | 131 | log.Printf("[DEBUG] Error Parsing StatusCake TestID: %s", d.Id()) |
132 | } | 132 | } |
133 | test := &wtf.Test{ | 133 | test := &statuscake.Test{ |
134 | TestID: testId, | 134 | TestID: testId, |
135 | } | 135 | } |
136 | if v, ok := d.GetOk("website_name"); ok { | 136 | if v, ok := d.GetOk("website_name"); ok { |