github.com/aznashwan/terraform@v0.4.3-0.20151118032030-21f93ca4558d/state/remote/swift_test.go (about) 1 package remote 2 3 import ( 4 "net/http" 5 "os" 6 "testing" 7 ) 8 9 func TestSwiftClient_impl(t *testing.T) { 10 var _ Client = new(SwiftClient) 11 } 12 13 func TestSwiftClient(t *testing.T) { 14 os_auth_url := os.Getenv("OS_AUTH_URL") 15 if os_auth_url == "" { 16 t.Skipf("skipping, OS_AUTH_URL and friends must be set") 17 } 18 19 if _, err := http.Get(os_auth_url); err != nil { 20 t.Skipf("skipping, unable to reach %s: %s", os_auth_url, err) 21 } 22 23 client, err := swiftFactory(map[string]string{ 24 "path": "swift_test", 25 }) 26 if err != nil { 27 t.Fatalf("bad: %s", err) 28 } 29 30 testClient(t, client) 31 }