This commit is contained in:
Jintao Zhang 2023-12-08 12:38:23 +01:00 committed by GitHub
commit c9b7c5a0a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 15 deletions

View file

@ -172,7 +172,7 @@ kind-e2e-chart-tests: ## Run helm chart e2e tests
e2e-test-binary: ## Build binary for e2e tests.
@build/run-in-docker.sh \
MAC_OS=$(MAC_OS) \
ginkgo build ./test/e2e
GOBIN=/tmp/bin go generate tools/ginkgo.go && ls /tmp/bin/ginkgo && /tmp/bin/ginkgo build ./test/e2e
.PHONY: print-e2e-suite
print-e2e-suite: e2e-test-binary ## Prints information about the suite of e2e tests.

View file

@ -86,10 +86,6 @@ USER=${USER:-nobody}
if [[ "$DOCKER_IN_DOCKER_ENABLED" == "true" ]]; then
echo "..reached DIND check TRUE block, inside run-in-docker.sh"
echo "FLAGS=$FLAGS"
#go env
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.13.0
find / -type f -name ginkgo 2>/dev/null
which ginkgo
/bin/bash -c "${FLAGS}"
else
echo "Reached DIND check ELSE block, inside run-in-docker.sh"

View file

@ -30,7 +30,6 @@ ARG CHART_TESTING_VERSION
ARG HELM_VERSION
ARG YAMALE_VERSION
ARG YAML_LINT_VERSION
ARG GINKGO_VERSION
ARG GOLINT_VERSION
@ -68,8 +67,7 @@ RUN apk update && apk upgrade && apk add --no-cache \
tzdata \
libc6-compat
RUN go install -v github.com/onsi/ginkgo/v2/ginkgo@v${GINKGO_VERSION} \
&& go install golang.org/x/lint/golint@${GOLINT_VERSION}
RUN go install golang.org/x/lint/golint@${GOLINT_VERSION}
RUN wget -qO /tmp/resty_cli.tgz \
https://github.com/openresty/resty-cli/archive/v${RESTY_CLI_VERSION}.tar.gz \

View file

@ -77,9 +77,6 @@ if [ "${SKIP_CLUSTER_CREATION:-false}" = "false" ]; then
fi
if [ "${SKIP_IMAGE_CREATION:-false}" = "false" ]; then
if ! command -v ginkgo &> /dev/null; then
go install github.com/onsi/ginkgo/v2/ginkgo@v2.13.0
fi
echo "[dev-env] building image"
make -C ${DIR}/../../ clean-image build image
fi

View file

@ -95,10 +95,6 @@ if [ "${SKIP_INGRESS_IMAGE_CREATION}" = "false" ]; then
fi
if [ "${SKIP_E2E_IMAGE_CREATION}" = "false" ]; then
if ! command -v ginkgo &> /dev/null; then
go install github.com/onsi/ginkgo/v2/ginkgo@v2.13.0
fi
echo "[dev-env] .. done building controller images"
echo "[dev-env] now building e2e-image.."
make -C "${DIR}"/../e2e-image image

25
tools/ginkgo.go Normal file
View file

@ -0,0 +1,25 @@
//go:build ignore
/*
Copyright 2023 The Kubernetes Authors.
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.
*/
package tools
import (
_ "github.com/onsi/ginkgo/v2/ginkgo"
)
//go:generate go install github.com/onsi/ginkgo/v2/ginkgo