talos/hack/test/e2e-docker.sh
Andrey Smirnov 0afd0f651b chore: provide provisioned cluster info to integration test
Integration test can optionally consume cluster state as generated by
the call to `osctl cluster create` and use it to discover nodes in
integration tests.

This means that now CLI tests can use that as discovery source, and
API/K8s tests by default as well.

Flat list of nodes is to be replaced by something more complex in the
next iteration, but it's good for this PR.

As a demo, add CLI test with multiple nodes (dmesg).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-01-31 18:21:30 +03:00

37 lines
651 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 {
"${OSCTL}" cluster create \
--provisioner "${PROVISIONER}" \
--name "${CLUSTER_NAME}" \
--image "${IMAGE}" \
--masters=3 \
--mtu 1500 \
--memory 2048 \
--cpus 4.0 \
--wait \
--endpoint "${ENDPOINT}"
}
create_cluster
get_kubeconfig
${KUBECTL} config set-cluster e2e-docker --server https://${ENDPOINT}:6443
run_talos_integration_test_docker
run_kubernetes_integration_test