Jon Perritt | 0eeeb0c | 2015-03-17 22:38:31 -0600 | [diff] [blame] | 1 | // +build acceptance |
| 2 | |
| 3 | package v3 |
| 4 | |
| 5 | import ( |
| 6 | "os" |
| 7 | "testing" |
| 8 | |
| 9 | "github.com/rackspace/gophercloud" |
| 10 | "github.com/rackspace/gophercloud/rackspace" |
| 11 | th "github.com/rackspace/gophercloud/testhelper" |
| 12 | ) |
| 13 | |
| 14 | func newClient(t *testing.T) *gophercloud.ServiceClient { |
| 15 | ao, err := rackspace.AuthOptionsFromEnv() |
| 16 | th.AssertNoErr(t, err) |
| 17 | |
| 18 | client, err := rackspace.AuthenticatedClient(ao) |
| 19 | th.AssertNoErr(t, err) |
| 20 | |
| 21 | c, err := rackspace.NewRackConnectV3(client, gophercloud.EndpointOpts{ |
| 22 | Region: os.Getenv("RS_REGION_NAME"), |
| 23 | }) |
| 24 | th.AssertNoErr(t, err) |
| 25 | return c |
| 26 | } |