run multi-server e2e tests for multiple k3s versions
This commit is contained in:
parent
1c61130fdf
commit
504fd3ad31
@ -32,7 +32,7 @@ steps:
|
||||
commands:
|
||||
- apk add git bash curl sudo jq make
|
||||
- sleep 5 # give docker enough time to start
|
||||
- make e2e
|
||||
- make e2e -e E2E_EXTRA=true # E2E_EXTRA=true enables tests with multiple k3s versions
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
|
@ -244,6 +244,9 @@ func NodeStart(ctx context.Context, runtime runtimes.Runtime, node *k3d.Node, no
|
||||
return nil
|
||||
}
|
||||
|
||||
startTime := time.Now()
|
||||
log.Debugf("Node %s Start Time: %+v", node.Name, startTime)
|
||||
|
||||
// execute lifecycle hook actions
|
||||
for _, hook := range nodeStartOpts.NodeHooks {
|
||||
if hook.Stage == k3d.LifecycleStagePreStart {
|
||||
@ -257,7 +260,6 @@ func NodeStart(ctx context.Context, runtime runtimes.Runtime, node *k3d.Node, no
|
||||
// start the node
|
||||
log.Tracef("Starting node '%s'", node.Name)
|
||||
|
||||
startTime := time.Now()
|
||||
if err := runtime.StartNode(ctx, node); err != nil {
|
||||
log.Errorf("Failed to start node '%s'", node.Name)
|
||||
return err
|
||||
|
@ -50,6 +50,7 @@ done
|
||||
if [ -z "$E2E_HELPER_IMAGE_TAG" ]; then
|
||||
docker exec --workdir /src "$k3de2e" make build-helper-images
|
||||
# execute tests
|
||||
echo "Start time outside runner: $(date)"
|
||||
docker exec "$k3de2e" /src/tests/runner.sh
|
||||
else
|
||||
# execute tests
|
||||
|
@ -3,7 +3,7 @@
|
||||
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; }
|
||||
|
||||
K3S_VERSIONS=("v1.17.14-k3s2" "v1.18.12-k3s1" "v1.19.2-k3s1" "v1.19.4-k3s1")
|
||||
K3S_VERSIONS=("v1.17.17-k3s1" "v1.18.15-k3s1" "v1.19.7-k3s1" "v1.20.2-k3s1")
|
||||
FAILED_TESTS=()
|
||||
|
||||
# shellcheck source=./common.sh
|
||||
@ -25,11 +25,22 @@ for version in "${K3S_VERSIONS[@]}"; do
|
||||
FAILED_TESTS+=("full_lifecycle: $version")
|
||||
fi
|
||||
|
||||
$EXE cluster rm -a || failed "failed to delete clusters"
|
||||
|
||||
K3S_IMAGE_TAG="$version" $CURR_DIR/test_multi_master.sh
|
||||
if [[ $? -eq 1 ]]; then
|
||||
FAILED_TESTS+=("multi_master: $version")
|
||||
fi
|
||||
|
||||
$EXE cluster rm -a || failed "failed to delete clusters"
|
||||
|
||||
K3S_IMAGE_TAG="$version" $CURR_DIR/test_multi_master_start_stop.sh
|
||||
if [[ $? -eq 1 ]]; then
|
||||
FAILED_TESTS+=("multi_master_start_stop: $version")
|
||||
fi
|
||||
|
||||
$EXE cluster rm -a || failed "failed to delete clusters"
|
||||
|
||||
done
|
||||
|
||||
if [[ ${#FAILED_TESTS[@]} -gt 0 ]]; then
|
||||
|
@ -18,6 +18,8 @@ info "Preparing filesystem and environment..."
|
||||
|
||||
mkdir -p $HOME/.kube
|
||||
|
||||
echo "Start time inside runner: $(date)"
|
||||
|
||||
section "BASIC TESTS"
|
||||
|
||||
for i in $CURR_DIR/test_*.sh ; do
|
||||
|
Loading…
Reference in New Issue
Block a user