github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/clc/provider_test.go (about) 1 package clc 2 3 import ( 4 "os" 5 "testing" 6 7 "github.com/hashicorp/terraform/helper/schema" 8 "github.com/hashicorp/terraform/terraform" 9 ) 10 11 var testAccProviders map[string]terraform.ResourceProvider 12 var testAccProvider *schema.Provider 13 14 const testAccDC = "IL1" 15 16 func init() { 17 testAccProvider = Provider().(*schema.Provider) 18 testAccProviders = map[string]terraform.ResourceProvider{ 19 "clc": testAccProvider, 20 } 21 } 22 23 func TestProvider(t *testing.T) { 24 if err := Provider().(*schema.Provider).InternalValidate(); err != nil { 25 t.Fatalf("err: %s", err) 26 } 27 } 28 29 func TestProvider_impl(t *testing.T) { 30 var _ terraform.ResourceProvider = Provider() 31 } 32 33 func testAccPreCheck(t *testing.T) { 34 if v := os.Getenv("CLC_USERNAME"); v == "" { 35 t.Fatal("CLC_USERNAME must be set for acceptance tests") 36 } 37 if v := os.Getenv("CLC_PASSWORD"); v == "" { 38 t.Fatal("CLC_PASSWORD must be set for acceptance tests") 39 } 40 }