blob: 8c75314174501deedad3b757dc2e5b4795a3987b [file] [log] [blame]
Jon Perritt0eeeb0c2015-03-17 22:38:31 -06001// +build acceptance
2
3package v3
4
5import (
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
14func 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}