blob: 654740a32c269f2f9a0f6583af1ba2b96a2459bf [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
Jamie Hannaford2a2a1462014-09-10 14:05:45 +02008> may incur bandwidth and service charges for all the resource usage. These
9> tests *should* remove their remote products automatically. However, there may
10> be certain cases where this does not happen; always double-check to make sure
11> you have no stragglers left behind.
Jamie Hannaforde8ab7b42014-09-09 16:40:06 +020012
13### Step 1. Set environment variables
14
15#### Authentication
16
17|Name|Description|
18|---|---|
19|`OS_USERNAME`|Your API username|
20|`OS_PASSWORD`|Your API password|
21|`OS_AUTH_URL`|The identity URL you need to authenticate|
22|`OS_TENANT_NAME`|Your API tenant name|
23|`OS_TENANT_ID`|Your API tenant ID|
24
25#### General
26
27|Name|Description|
28|---|---|
29|`OS_REGION_NAME`|The region you want your resources to reside in|
30
31#### Compute
32
33|Name|Description|
34|---|---|
35|`OS_IMAGE_ID`|The ID of the image your want your server to be based on|
36|`OS_FLAVOR_ID`|The ID of the flavor you want your server to be based on|
37|`OS_FLAVOR_ID_RESIZE`|The ID of the flavor you want your server to be resized to|
38
39### 2. Run the test suite
40
Jamie Hannaford2a2a1462014-09-10 14:05:45 +020041From any directory, run:
Jamie Hannaforde8ab7b42014-09-09 16:40:06 +020042
43```
44go test -v -tags acceptance github.com/rackspace/gophercloud/...
45```
46
47Alternatively, you can execute the above from your nested git folder (i.e. the
48 workspace visible when browsing the Github repository) by replacing
49 `github.com/rackspace/gophercloud/...` with `./...`