Skip to content

Commit

Permalink
Add KIND as a dependency for e2e test (#615)
Browse files Browse the repository at this point in the history
* Add `KIND` as a dependency for e2e test

* Update kind node version

* Add fix for `https://github.com/kubernetes/test-infra/issues/23741`

* Drop deprecated `progress` flag of ginkgo
  • Loading branch information
acumino authored Jun 14, 2023
1 parent c8cd486 commit 50a64ad
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions hack/e2e-test/infrastructure/kind/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hack/e2e-test/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
25 changes: 25 additions & 0 deletions hack/kind-up.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion hack/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50a64ad

Please sign in to comment.