blob: 30a2dc7e44762fcfbb2ba27af961f81a8c64f6dc [file] [log] [blame] [view]
Jamie Hannaforde8ab7b42014-09-09 16:40:06 +02001# Gophercloud Acceptance tests
2
3The purpose of these acceptance tests is to validate that SDK features meet
4the requirements of a contract - to consumers, other parts of the library, and
5to a remote API.
6
7> **Note:** Because every test will be run against a real API endpoint, you
8> will incur bandwidth and service charges for all the resource usage. Please
9> ensure you delete these resources when you're finished!
10
11### Step 1. Set environment variables
12
13#### Authentication
14
15|Name|Description|
16|---|---|
17|`OS_USERNAME`|Your API username|
18|`OS_PASSWORD`|Your API password|
19|`OS_AUTH_URL`|The identity URL you need to authenticate|
20|`OS_TENANT_NAME`|Your API tenant name|
21|`OS_TENANT_ID`|Your API tenant ID|
22
23#### General
24
25|Name|Description|
26|---|---|
27|`OS_REGION_NAME`|The region you want your resources to reside in|
28
29#### Compute
30
31|Name|Description|
32|---|---|
33|`OS_IMAGE_ID`|The ID of the image your want your server to be based on|
34|`OS_FLAVOR_ID`|The ID of the flavor you want your server to be based on|
35|`OS_FLAVOR_ID_RESIZE`|The ID of the flavor you want your server to be resized to|
36
37### 2. Run the test suite
38
39From your `$GOPATH` directory, run:
40
41```
42go test -v -tags acceptance github.com/rackspace/gophercloud/...
43```
44
45Alternatively, you can execute the above from your nested git folder (i.e. the
46 workspace visible when browsing the Github repository) by replacing
47 `github.com/rackspace/gophercloud/...` with `./...`