|
|
@ -3,18 +3,28 @@ |
|
|
|
CURR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
|
|
|
CURR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
|
|
|
[ -d "$CURR_DIR" ] || { echo "FATAL: no current dir (maybe running in zsh?)"; exit 1; } |
|
|
|
[ -d "$CURR_DIR" ] || { echo "FATAL: no current dir (maybe running in zsh?)"; exit 1; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KNOWN_TO_FAIL=("v1.17.17-k3s1" "v1.18.15-k3s1") # some versions of k3s don't work here (dqlite), so we can skip them here |
|
|
|
|
|
|
|
|
|
|
|
# shellcheck source=./common.sh |
|
|
|
# shellcheck source=./common.sh |
|
|
|
source "$CURR_DIR/common.sh" |
|
|
|
source "$CURR_DIR/common.sh" |
|
|
|
|
|
|
|
|
|
|
|
: "${EXTRA_FLAG:=""}" |
|
|
|
: "${EXTRA_FLAG:=""}" |
|
|
|
: "${EXTRA_TITLE:=""}" |
|
|
|
: "${EXTRA_TITLE:=""}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export CURRENT_STAGE="Test | multi-server-start-stop | $K3S_IMAGE_TAG" |
|
|
|
|
|
|
|
|
|
|
|
if [[ -n "$K3S_IMAGE_TAG" ]]; then |
|
|
|
if [[ -n "$K3S_IMAGE_TAG" ]]; then |
|
|
|
|
|
|
|
for failing in "${KNOWN_TO_FAIL[@]}"; do |
|
|
|
|
|
|
|
if [[ "$failing" == "$K3S_IMAGE_TAG" ]]; then |
|
|
|
|
|
|
|
warn "$K3S_IMAGE_TAG is known to fail this test. Skipping." |
|
|
|
|
|
|
|
exit 0 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
EXTRA_FLAG="--image rancher/k3s:$K3S_IMAGE_TAG" |
|
|
|
EXTRA_FLAG="--image rancher/k3s:$K3S_IMAGE_TAG" |
|
|
|
EXTRA_TITLE="(rancher/k3s:$K3S_IMAGE_TAG)" |
|
|
|
EXTRA_TITLE="(rancher/k3s:$K3S_IMAGE_TAG)" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
export CURRENT_STAGE="Test | multi-server-start-stop | $K3S_IMAGE_TAG" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info "Creating cluster multiserver $EXTRA_TITLE ..." |
|
|
|
info "Creating cluster multiserver $EXTRA_TITLE ..." |
|
|
|
$EXE cluster create "multiserver" --servers 3 --api-port 6443 --wait --timeout 360s $EXTRA_FLAG || failed "could not create cluster multiserver $EXTRA_TITLE" |
|
|
|
$EXE cluster create "multiserver" --servers 3 --api-port 6443 --wait --timeout 360s $EXTRA_FLAG || failed "could not create cluster multiserver $EXTRA_TITLE" |
|
|
|