blob: 1bcca06874afbc7cca6ee37f1d94ff78321e7886 [file] [log] [blame]
Jon Perritt35e27e42014-12-05 11:10:46 -07001// +build acceptance
2
3package v1
4
5import (
6 "os"
7 "testing"
8
9 "github.com/rackspace/gophercloud"
10 "github.com/rackspace/gophercloud/openstack"
11 th "github.com/rackspace/gophercloud/testhelper"
12)
13
14func newClient(t *testing.T) *gophercloud.ServiceClient {
15 ao, err := openstack.AuthOptionsFromEnv()
16 th.AssertNoErr(t, err)
17
18 client, err := openstack.AuthenticatedClient(ao)
19 th.AssertNoErr(t, err)
20
21 c, err := openstack.NewOrchestrationV1(client, gophercloud.EndpointOpts{
22 Region: os.Getenv("OS_REGION_NAME"),
23 })
24 th.AssertNoErr(t, err)
25 return c
26}