| Jamie Hannaford | e8ab7b4 | 2014-09-09 16:40:06 +0200 | [diff] [blame^] | 1 | # Gophercloud Acceptance tests |
| 2 | |
| 3 | The purpose of these acceptance tests is to validate that SDK features meet |
| 4 | the requirements of a contract - to consumers, other parts of the library, and |
| 5 | to 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 | |
| 39 | From your `$GOPATH` directory, run: |
| 40 | |
| 41 | ``` |
| 42 | go test -v -tags acceptance github.com/rackspace/gophercloud/... |
| 43 | ``` |
| 44 | |
| 45 | Alternatively, 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 `./...` |