Gophercloud Acceptance tests

The purpose of these acceptance tests is to validate that SDK features meet the requirements of a contract - to consumers, other parts of the library, and to a remote API.

Note: Because every test will be run against a real API endpoint, you may incur bandwidth and service charges for all the resource usage. These tests should remove their remote products automatically. However, there may be certain cases where this does not happen; always double-check to make sure you have no stragglers left behind.

Step 1. Set environment variables

Authentication

NameDescription
OS_USERNAMEYour API username
OS_PASSWORDYour API password
OS_AUTH_URLThe identity URL you need to authenticate
OS_TENANT_NAMEYour API tenant name
OS_TENANT_IDYour API tenant ID

General

NameDescription
OS_REGION_NAMEThe region you want your resources to reside in

Compute

NameDescription
OS_IMAGE_IDThe ID of the image your want your server to be based on
OS_FLAVOR_IDThe ID of the flavor you want your server to be based on
OS_FLAVOR_ID_RESIZEThe ID of the flavor you want your server to be resized to

2. Run the test suite

From any directory, run:

go test -v -tags acceptance github.com/rackspace/gophercloud/...

Alternatively, you can execute the above from your nested git folder (i.e. the workspace visible when browsing the Github repository) by replacing github.com/rackspace/gophercloud/... with ./...