From 468545766791749591f36b4bd073fa0c33d531ac Mon Sep 17 00:00:00 2001 From: Zach Shepherd Date: Wed, 29 Aug 2018 13:01:12 -0700 Subject: [PATCH] Improve docs for running local integration tests (#8145) The instructions for using local-integration-test.sh were incomplete. Improve them to reflect the current requirements for using the script. --- tests/README.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/tests/README.md b/tests/README.md index a28517b29e..10a3f7a8fc 100644 --- a/tests/README.md +++ b/tests/README.md @@ -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 @@ -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. \ No newline at end of file +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.