2015-06-05 21:05:21 +02:00
|
|
|
package remote
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"testing"
|
2015-06-06 19:19:25 +02:00
|
|
|
"os"
|
2015-06-05 21:05:21 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestSwiftClient_impl(t *testing.T) {
|
|
|
|
var _ Client = new(SwiftClient)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestSwiftClient(t *testing.T) {
|
2015-06-06 19:19:25 +02:00
|
|
|
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)
|
2015-06-05 21:05:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
client, err := swiftFactory(map[string]string{
|
|
|
|
"path": "swift_test",
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("bad: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
testClient(t, client)
|
|
|
|
}
|