Integration tests require a running Kubevirt cluster. Once you have a running
Kubevirt cluster, you can use the -master
and the -kubeconfig
flags to
point the tests to the cluster.
cd tests # from the git repo root folder
go test -kubeconfig=path/to/my/config
There is a make target to run this with the config taken from hack/config.sh:
# from the git repo root folder
make functest
# Create directory for data / results / kubectl binary
mkdir -p /tmp/kubevirt-tests-data
# Make sure that eveybody can write there
setfacl -m d:o:rwx /tmp/kubevirt-tests-data
setfacl -m o:rwx /tmp/kubevirt-tests-data
docker run \
-v /tmp/kubevirt-tests-data:/home/kubevirt-tests/data:rw,z --rm \
kubevirt/tests:latest \
--kubeconfig=data/openshift-master.kubeconfig \
--container-tag=latest \
--container-prefix=docker.io/kubevirt \
--test.timeout 180m \
--junit-output=data/results/junit.xml \
--deploy-testing-infra \
--path-to-testing-infra-manifests=data/manifests