6fe2703665
* Remove `make updatedeps` from Travis build. We'll follow up with more specific plans around dependency updating in subsequent PRs. * Update all `make` targets to set `GO15VENDOREXPERIMENT=1` and to filter out `/vendor/` from `./...` where appropriate. * Temporarily remove `vet` from the `make test` target until we can figure out how to get it to not vet `vendor/`. (Initial experimentation failed to yield the proper incantation.) Everything is pinned to current master, with the exception of: * Azure/azure-sdk-for-go which is pinned before the breaking change today * aws/aws-sdk-go which is pinned to the most recent tag The documentation still needs to be updated, which we can do in a follow up PR. The goal here is to unblock release. |
||
---|---|---|
.. | ||
esxbox | ||
images | ||
vcsim | ||
.gitignore | ||
README.md | ||
boot_order_test.sh | ||
clean.sh | ||
cli.bats | ||
datacenter.bats | ||
datastore.bats | ||
device.bats | ||
esxcli.bats | ||
events.bats | ||
extension.bats | ||
fields.bats | ||
firewall.bats | ||
govc-sim | ||
host.bats | ||
import.bats | ||
license.bats | ||
logs.bats | ||
ls.bats | ||
network.bats | ||
pool.bats | ||
test_helper.bash | ||
vm.bats |
README.md
Functional tests for govc
Bats
Install Bats
coreutils
Install gxargs, greadlink and gmktemp on Darwin
brew install coreutils
brew install findutils
Download test images
Some tests depend on ttylinux images, these can be downloaded by running:
./images/update.sh
These images are uploaded to the esxbox as needed by tests and can be removed with the following command:
./clean.sh
GOVC_TEST_URL
The govc tests need an ESX instance to run against. The default
GOVC_TEST_URL
is that of the vagrant box in the esxbox directory:
(cd esxbox && vagrant up)
Any other ESX box can be used by exporting the following variable:
export GOVC_TEST_URL=user:pass@hostname
vCenter Simulator
Some tests require vCenter and depend on the Vagrant box in the vcsim directory. These tests are skipped if the vcsim box is not running. To enable these tests:
(cd vcsim && vagrant up)
Running tests
The test helper prepends ../govc to PATH
.
The tests can be run from any directory, as govc is found related to
PATH
and images are found relative to $BATS_TEST_DIRNAME
.
The entire suite can be run with the following command:
bats .
Or individually, for example:
./cli.bats