Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: chore(ci): easy to bump ginkgo's version #10648

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ls is required?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required.
For test purposes, I shall eliminate the 'ls' following the rectification of the CI.


.PHONY: print-e2e-suite
print-e2e-suite: e2e-test-binary ## Prints information about the suite of e2e tests.
Expand Down
4 changes: 0 additions & 4 deletions build/run-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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"
Expand Down
2 changes: 2 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
Expand All @@ -267,6 +268,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
4 changes: 1 addition & 3 deletions images/test-runner/rootfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ARG CHART_TESTING_VERSION
ARG HELM_VERSION
ARG YAMALE_VERSION
ARG YAML_LINT_VERSION
ARG GINKGO_VERSION
ARG GOLINT_VERSION


Expand Down Expand Up @@ -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 \
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/run-chart-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
fi
echo "[dev-env] building image"
make -C ${DIR}/../../ clean-image build image
fi
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/run-kind-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
fi

echo "[dev-env] .. done building controller images"
echo "[dev-env] now building e2e-image.."
make -C "${DIR}"/../e2e-image image
Expand Down
25 changes: 25 additions & 0 deletions tools/ginkgo.go
Original file line number Diff line number Diff line change
@@ -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