Rename environment variables to run Swift testsuite

Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
This commit is contained in:
Sylvain Baubeau 2015-06-30 14:24:16 +02:00
parent d0dd36125c
commit 53e80944f1

View file

@ -36,23 +36,17 @@ func init() {
swiftServer *swifttest.SwiftServer swiftServer *swifttest.SwiftServer
err error err error
) )
if username = os.Getenv("OS_USERNAME"); username == "" { username = os.Getenv("SWIFT_USERNAME")
username = os.Getenv("ST_USER") password = os.Getenv("SWIFT_PASSWORD")
} authURL = os.Getenv("SWIFT_AUTH_URL")
if password = os.Getenv("OS_PASSWORD"); password == "" { tenant = os.Getenv("SWIFT_TENANT_NAME")
password = os.Getenv("ST_KEY") tenantID = os.Getenv("SWIFT_TENANT_ID")
} domain = os.Getenv("SWIFT_DOMAIN_NAME")
if authURL = os.Getenv("OS_AUTH_URL"); authURL == "" { domainID = os.Getenv("SWIFT_DOMAIN_ID")
authURL = os.Getenv("ST_AUTH") container = os.Getenv("SWIFT_CONTAINER_NAME")
} region = os.Getenv("SWIFT_REGION_NAME")
tenant = os.Getenv("OS_TENANT_NAME") prefix = os.Getenv("SWIFT_CONTAINER_PREFIX")
tenantID = os.Getenv("OS_TENANT_ID") insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY"))
domain = os.Getenv("OS_DOMAIN_NAME")
domainID = os.Getenv("OS_DOMAIN_ID")
container = os.Getenv("OS_CONTAINER_NAME")
region = os.Getenv("OS_REGION_NAME")
prefix = os.Getenv("OS_CONTAINER_PREFIX")
insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("ST_INSECURESKIPVERIFY"))
if username == "" || password == "" || authURL == "" || container == "" { if username == "" || password == "" || authURL == "" || container == "" {
if swiftServer, err = swifttest.NewSwiftServer("localhost"); err != nil { if swiftServer, err = swifttest.NewSwiftServer("localhost"); err != nil {