diff --git a/hack/lib/install.sh b/hack/lib/install.sh index d46330b1ca..9100a262b1 100644 --- a/hack/lib/install.sh +++ b/hack/lib/install.sh @@ -88,3 +88,14 @@ function install-helm { echo -n "Found helm, version: " && helm version fi } + +function install-ginkgo-if-not-exist { + echo "Checking ginkgo" + which ginkgo >/dev/null 2>&1 + if [[ $? -ne 0 ]]; then + echo "Installing ginkgo ..." + go install github.com/onsi/ginkgo/v2/ginkgo + else + echo -n "Found ginkgo, version: " && ginkgo version + fi +} \ No newline at end of file diff --git a/hack/run-e2e-kind.sh b/hack/run-e2e-kind.sh index 37183d457c..6f0d2774fd 100755 --- a/hack/run-e2e-kind.sh +++ b/hack/run-e2e-kind.sh @@ -122,7 +122,7 @@ install-volcano # Run e2e test cd ${VK_ROOT} -GO111MODULE=off go get github.com/onsi/ginkgo/ginkgo +install-ginkgo-if-not-exist case ${E2E_TYPE} in "ALL")