talos/hack/test/e2e-docker.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

37 lines
670 B
Bash
Executable File

#!/bin/bash
set -eou pipefail
source ./hack/test/e2e.sh
case "${CI:-false}" in
true)
ENDPOINT="docker"
;;
*)
ENDPOINT="127.0.0.1"
;;
esac
PROVISIONER=docker
CLUSTER_NAME=e2e-${PROVISIONER}
function create_cluster {
"${TALOSCTL}" cluster create \
--provisioner "${PROVISIONER}" \
--name "${CLUSTER_NAME}" \
--image "${IMAGE}" \
--masters=3 \
--mtu 1500 \
--memory 2048 \
--cpus 4.0 \
--endpoint "${ENDPOINT}" \
--with-init-node=false
}
create_cluster
get_kubeconfig
${KUBECTL} config set-cluster e2e-docker --server https://${ENDPOINT}:6443
run_talos_integration_test_docker
run_kubernetes_integration_test