1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00
vsphere-influxdb-go/vendor/github.com/vmware/govmomi/govc/test
2017-10-25 20:52:40 +00:00
..
esxbox add vendoring with go dep 2017-10-25 20:52:40 +00:00
images add vendoring with go dep 2017-10-25 20:52:40 +00:00
vcsim add vendoring with go dep 2017-10-25 20:52:40 +00:00
.gitignore add vendoring with go dep 2017-10-25 20:52:40 +00:00
boot_order_test.sh add vendoring with go dep 2017-10-25 20:52:40 +00:00
clean.sh add vendoring with go dep 2017-10-25 20:52:40 +00:00
cli.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
datacenter.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
datastore_file_manager_test.sh add vendoring with go dep 2017-10-25 20:52:40 +00:00
datastore_tail_test.sh add vendoring with go dep 2017-10-25 20:52:40 +00:00
datastore.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
device.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
esxcli.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
events.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
extension.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
fields.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
firewall.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
folder.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
govc-sim add vendoring with go dep 2017-10-25 20:52:40 +00:00
guest_operations_test.sh add vendoring with go dep 2017-10-25 20:52:40 +00:00
host_cert_sign.sh add vendoring with go dep 2017-10-25 20:52:40 +00:00
host.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
import.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
license.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
logs.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
ls.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
metric_info_test.sh add vendoring with go dep 2017-10-25 20:52:40 +00:00
metric.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
network.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
object.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
pool.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
README.md add vendoring with go dep 2017-10-25 20:52:40 +00:00
role.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
session.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00
test_helper.bash add vendoring with go dep 2017-10-25 20:52:40 +00:00
vm.bats add vendoring with go dep 2017-10-25 20:52:40 +00:00

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:

cd $GOPATH/github.com/vmware/govmomi/govc
go build -v .
bats test

Or individually, for example:

./test/cli.bats