| 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 |
| Jamie Hannaford | 2a2a146 | 2014-09-10 14:05:45 +0200 | [diff] [blame^] | 8 | > 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 Hannaford | e8ab7b4 | 2014-09-09 16:40:06 +0200 | [diff] [blame] | 12 | |
| 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 Hannaford | 2a2a146 | 2014-09-10 14:05:45 +0200 | [diff] [blame^] | 41 | From any directory, run: |
| Jamie Hannaford | e8ab7b4 | 2014-09-09 16:40:06 +0200 | [diff] [blame] | 42 | |
| 43 | ``` |
| 44 | go test -v -tags acceptance github.com/rackspace/gophercloud/... |
| 45 | ``` |
| 46 | |
| 47 | Alternatively, 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 `./...` |