From f318381662cf137e012670140c798a78b52c7302 Mon Sep 17 00:00:00 2001 From: Feruzjon Muyassarov Date: Sun, 5 May 2024 13:22:47 +0300 Subject: [PATCH] update testing script to accommodate changes in vendor directory handling Signed-off-by: Feruzjon Muyassarov --- cluster-autoscaler/Makefile | 2 -- hack/for-go-proj.sh | 15 +++++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/cluster-autoscaler/Makefile b/cluster-autoscaler/Makefile index f9afa70c771e..672945a9b54d 100644 --- a/cluster-autoscaler/Makefile +++ b/cluster-autoscaler/Makefile @@ -37,8 +37,6 @@ IMAGE=$(REGISTRY)/cluster-autoscaler$(PROVIDER) export DOCKER_CLI_EXPERIMENTAL := enabled build: - @echo "⚠️ WARNING: The vendor directory will be removed soon. \ - Please make sure your dependencies are managed via Go modules." @$(MAKE) build-arch-$(GOARCH) build-arch-%: clean-arch-% diff --git a/hack/for-go-proj.sh b/hack/for-go-proj.sh index ec55ef23d2b2..f44f997c41fd 100755 --- a/hack/for-go-proj.sh +++ b/hack/for-go-proj.sh @@ -19,7 +19,7 @@ set -o pipefail set -o nounset CONTRIB_ROOT="$(dirname ${BASH_SOURCE})/.." -PROJECT_NAMES=(addon-resizer cluster-autoscaler vertical-pod-autoscaler) +PROJECT_NAMES=(addon-resizer vertical-pod-autoscaler) if [[ $# -ne 1 ]]; then echo "missing subcommand: [build|install|test]" @@ -43,12 +43,7 @@ esac for project_name in ${PROJECT_NAMES[*]}; do ( - if [[ $project_name == cluster-autoscaler ]];then - export GO111MODULE=off - else - export GO111MODULE=auto - fi - + export GO111MODULE=auto project=${CONTRIB_ROOT}/${project_name} echo "${CMD}ing ${project}" cd "${project}" @@ -68,6 +63,10 @@ for project_name in ${PROJECT_NAMES[*]}; do done; if [ "${CMD}" = "build" ] || [ "${CMD}" == "test" ]; then - cd ${CONTRIB_ROOT}/vertical-pod-autoscaler/e2e + pushd ${CONTRIB_ROOT}/vertical-pod-autoscaler/e2e go test -mod vendor -run=None ./... + popd + pushd ${CONTRIB_ROOT}/cluster-autoscaler/ + go test ./... + popd fi