aboutsummaryrefslogtreecommitdiffhomepage
path: root/statuscake/provider_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'statuscake/provider_test.go')
-rw-r--r--statuscake/provider_test.go38
1 files changed, 38 insertions, 0 deletions
diff --git a/statuscake/provider_test.go b/statuscake/provider_test.go
new file mode 100644
index 0000000..83045d0
--- /dev/null
+++ b/statuscake/provider_test.go
@@ -0,0 +1,38 @@
1package statuscake
2
3import (
4 "os"
5 "testing"
6
7 "github.com/hashicorp/terraform/helper/schema"
8 "github.com/hashicorp/terraform/terraform"
9)
10
11var testAccProviders map[string]terraform.ResourceProvider
12var testAccProvider *schema.Provider
13
14func init() {
15 testAccProvider = Provider().(*schema.Provider)
16 testAccProviders = map[string]terraform.ResourceProvider{
17 "statuscake": testAccProvider,
18 }
19}
20
21func TestProvider(t *testing.T) {
22 if err := Provider().(*schema.Provider).InternalValidate(); err != nil {
23 t.Fatalf("err: %s", err)
24 }
25}
26
27func TestProvider_impl(t *testing.T) {
28 var _ terraform.ResourceProvider = Provider()
29}
30
31func testAccPreCheck(t *testing.T) {
32 if v := os.Getenv("STATUSCAKE_USERNAME"); v == "" {
33 t.Fatal("STATUSCAKE_USERNAME must be set for acceptance tests")
34 }
35 if v := os.Getenv("STATUSCAKE_APIKEY"); v == "" {
36 t.Fatal("STATUSCAKE_APIKEY must be set for acceptance tests")
37 }
38}