1
# Functional tests for govc
5
Install [Bats](https://github.com/sstephenson/bats/)
7
## Download test images
9
Some tests depend on [ttylinux](http://ttylinux.net) images, these can be downloaded by running:
15
These images are uploaded to the esxbox as needed by tests and can be
16
removed with the following command:
24
The govc tests need an ESX instance to run against. The default
25
`GOVC_TEST_URL` is that of the vagrant box in the *esxbox* directory:
28
(cd esxbox && vagrant up)
31
Any other ESX box can be used by exporting the following variable:
34
export GOVC_TEST_URL=user:pass@hostname
39
Some tests require vCenter and depend on the Vagrant box in the
40
*vcsim* directory. These tests are skipped if the vcsim box is not
41
running. To enable these tests:
44
(cd vcsim && vagrant up)
49
The *govc* binary should be in your `PATH`; the test helper also prepends ../govc to `PATH`.
51
The tests can be run from any directory, as *govc* is found related to
52
`PATH` and *images* are found relative to `$BATS_TEST_DIRNAME`.
54
The entire suite can be run with the following command:
60
Or individually, for example: