terraform/state/remote/swift_test.go

32 lines
567 B
Go
Raw Normal View History

package remote
import (
"net/http"
"os"
2015-06-24 07:31:24 +02:00
"testing"
)
func TestSwiftClient_impl(t *testing.T) {
var _ Client = new(SwiftClient)
}
func TestSwiftClient(t *testing.T) {
os_auth_url := os.Getenv("OS_AUTH_URL")
if os_auth_url == "" {
t.Skipf("skipping, OS_AUTH_URL and friends must be set")
}
if _, err := http.Get(os_auth_url); err != nil {
t.Skipf("skipping, unable to reach %s: %s", os_auth_url, err)
}
client, err := swiftFactory(map[string]string{
"path": "swift_test",
})
if err != nil {
t.Fatalf("bad: %s", err)
}
testClient(t, client)
}