Jon Perritt | 35e27e4 | 2014-12-05 11:10:46 -0700 | [diff] [blame^] | 1 | // +build acceptance |
| 2 | |
| 3 | package v1 |
| 4 | |
| 5 | import ( |
| 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 | |
| 14 | func 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 | } |