diff --git a/Makefile b/Makefile index 7a665462f..dc803bc4f 100644 --- a/Makefile +++ b/Makefile @@ -157,13 +157,13 @@ add-license-headers: $(GO_ADD_LICENSE) @./hack/addlicenseheaders.sh ${YEAR} .PHONY: kind-up -kind-up: +kind-up: $(KIND) @printf "\n\033[0;33m📌 NOTE: To target the newly created KinD cluster, please run the following command:\n\n export KUBECONFIG=$(KUBECONFIG_PATH)\n\033[0m\n" - kind create cluster --name etcd-druid-e2e --config hack/e2e-test/infrastructure/kind/cluster.yaml + ./hack/kind-up.sh .PHONY: kind-down -kind-down: - kind delete cluster --name etcd-druid-e2e +kind-down: $(KIND) + $(KIND) delete cluster --name etcd-druid-e2e .PHONY: deploy-localstack deploy-localstack: $(KUBECTL) diff --git a/hack/e2e-test/infrastructure/kind/cluster.yaml b/hack/e2e-test/infrastructure/kind/cluster.yaml index aed30de27..8ff2f09ce 100644 --- a/hack/e2e-test/infrastructure/kind/cluster.yaml +++ b/hack/e2e-test/infrastructure/kind/cluster.yaml @@ -2,6 +2,7 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane + image: kindest/node:v1.27.1 # port forward 80 on the host to 80 on this node extraPortMappings: - containerPort: 4566 diff --git a/hack/e2e-test/run-e2e-test.sh b/hack/e2e-test/run-e2e-test.sh index bb0a3d39c..9e905b4a1 100755 --- a/hack/e2e-test/run-e2e-test.sh +++ b/hack/e2e-test/run-e2e-test.sh @@ -116,7 +116,7 @@ function test_e2e { echo "-------------------" SOURCE_PATH=$PWD \ - go test -timeout=0 -mod=vendor ./test/e2e --v -args -ginkgo.v -ginkgo.progress + go test -timeout=0 -mod=vendor ./test/e2e --v -args -ginkgo.v -ginkgo.show-node-events fi } diff --git a/hack/kind-up.sh b/hack/kind-up.sh new file mode 100755 index 000000000..af9d90cec --- /dev/null +++ b/hack/kind-up.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Copyright 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +set -o errexit +set -o nounset +set -o pipefail + +source $(dirname "${0}")/../vendor/github.com/gardener/gardener/hack/ci-common.sh + +clamp_mss_to_pmtu + +kind create cluster --name etcd-druid-e2e --config hack/e2e-test/infrastructure/kind/cluster.yaml diff --git a/hack/test.sh b/hack/test.sh index 5545174b9..fe867c093 100755 --- a/hack/test.sh +++ b/hack/test.sh @@ -48,7 +48,7 @@ fi export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT=2m export GOMEGA_DEFAULT_EVENTUALLY_TIMEOUT=5s export GOMEGA_DEFAULT_EVENTUALLY_POLLING_INTERVAL=200ms -GINKGO_COMMON_FLAGS="-r -timeout=1h0m0s --randomize-all --randomize-suites --fail-on-pending --progress" +GINKGO_COMMON_FLAGS="-r -timeout=1h0m0s --randomize-all --randomize-suites --fail-on-pending --show-node-events" if ${TEST_COV:-false}; then output_dir=test/output