blob: 6467203f646a9caacb3895eac3de814cea19db6c [file] [log] [blame]
Samuel A. Falvo II2dd7d2f2014-06-30 16:18:08 -07001// +build acceptance,old
2
Rafael Garciae4a550e2013-12-06 17:00:32 -03003package main
4
5import (
Rafael Garcia752cb332013-12-12 22:16:58 -03006 "fmt"
7 "github.com/rackspace/gophercloud"
8 "os"
9 "strings"
Rafael Garciae4a550e2013-12-06 17:00:32 -030010)
11
12func main() {
Rafael Garcia752cb332013-12-12 22:16:58 -030013 provider, username, _, apiKey := getCredentials()
Rafael Garciae4a550e2013-12-06 17:00:32 -030014
Rafael Garcia752cb332013-12-12 22:16:58 -030015 if !strings.Contains(provider, "rackspace") {
16 fmt.Fprintf(os.Stdout, "Skipping test because provider doesn't support API_KEYs\n")
17 return
18 }
Rafael Garciae4a550e2013-12-06 17:00:32 -030019
Rafael Garcia752cb332013-12-12 22:16:58 -030020 _, err := gophercloud.Authenticate(
21 provider,
22 gophercloud.AuthOptions{
23 Username: username,
24 ApiKey: apiKey,
25 },
26 )
27 if err != nil {
28 panic(err)
29 }
Rafael Garciae4a550e2013-12-06 17:00:32 -030030}