Skip to content

Commit

Permalink
Improve docs for running local integration tests (vmware#8145)
Browse files Browse the repository at this point in the history
The instructions for using local-integration-test.sh were incomplete.
Improve them to reflect the current requirements for using the script.
  • Loading branch information
zjs authored Aug 29, 2018
1 parent 8878bef commit 4685457
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
# VIC Engine Integration & Functional Test Suite

To run the integration tests locally:
Integration tests can be run locally in several different ways.

## Automatic with defaults

Use ./local-integration-test.sh
Integration tests are [automatically run][ci] via Drone. The recommended way to
run integration tests locally is [local-integration-test.sh][sh].

This script requires that `govc` is [installed][govc-install] and available on
your `PATH`; `docker` is installed, available on your `PATH`, and usable by your
current user; the `drone` CLI is [installed][drone-install] and available on
your `PATH`; and the following environment variables are defined:

* `GITHUB_TOKEN`: A GitHub API token, used for retrieving the status of GitHub
issues associated with disabled tests (to ensure tests are re-enabled if the
associated issue has been closed).
* [`GOVC_URL`][govc-usage]: A valid `govc` URL including username and password.
* `GOVC_DATASTORE` (optional): The datastore tests should use, if multiple exist
in the target environment.
* `PUBLIC_NETWORK` (optional): The public network tests should use, if multiple
exist in the target environment.

The script can be invoked with `-t` to specify a specific test, suite, or group.

[ci]:../CONTRIBUTING.md#drone
[sh]:local-integration-test.sh
[govc-install]:https://github.com/vmware/govmomi/tree/master/govc#installation
[govc-usage]:https://github.com/vmware/govmomi/tree/master/govc#usage
[drone-install]:http://docs.drone.io/cli-installation/

## Manually configure local Drone

Expand Down Expand Up @@ -121,4 +144,4 @@ Here are some recommendations that will make running tests more effective.
tests to run in either shared VCH or standalone VCH mode.
- Add a cleanup.robot file that handles cleaning up the group-wide VCH. It needs to remove the group-wide VCH-NAME from the cleanup exception list.
2. Write all tests within robot file with the assumption that the VCH is in shared mode. Don't assume there are no previously created containers and images. If a robot file needs this precondition, make sure the suite setup cleans out the VCH before running any test.
3. If there is an existing VCH available, it is possible to bypass the VCH installation/deletion by adding a TARGET_VCH into the list of test secrets.
3. If there is an existing VCH available, it is possible to bypass the VCH installation/deletion by adding a TARGET_VCH into the list of test secrets.

0 comments on commit 4685457

Please sign in to comment.