talos/hack/test/provision-tests.sh
Andrew Rynhard d0d2ac3c74 test: default to using the bootstrap API
This moves our test scripts to using the bootstrap API. Some
automation around invoking the bootstrap API was also added
to give the same ease of use when creating clusters with the
CLI.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2020-06-24 08:46:10 -07:00

20 lines
684 B
Bash
Executable File

#!/bin/bash
set -eou pipefail
case "${REGISTRY:-false}" in
registry.ci.svc:5000)
REGISTRY_ADDR=`python -c "import socket; print socket.gethostbyname('registry.ci.svc')"`
INTEGRATION_TEST_FLAGS="-talos.provision.registry-mirror ${REGISTRY}=http://${REGISTRY_ADDR}:5000 -talos.provision.target-installer-registry=${REGISTRY}"
;;
*)
INTEGRATION_TEST_FLAGS=
;;
esac
if [ "${INTEGRATION_TEST_RUN:-undefined}" != "undefined" ]; then
INTEGRATION_TEST_FLAGS="${INTEGRATION_TEST_FLAGS} -test.run ${INTEGRATION_TEST_RUN}"
fi
"${INTEGRATION_TEST}" -test.v -talos.talosctlpath "${TALOSCTL}" -talos.provision.mem 2048 -talos.provision.cpu 2 ${INTEGRATION_TEST_FLAGS}