Skip to content

Commit

Permalink
update testing script to accommodate changes in vendor directory hand…
Browse files Browse the repository at this point in the history
…ling

Signed-off-by: Feruzjon Muyassarov <[email protected]>
  • Loading branch information
fmuyassarov committed May 10, 2024
1 parent 8ee8331 commit f318381
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions cluster-autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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-%
Expand Down
15 changes: 7 additions & 8 deletions hack/for-go-proj.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand All @@ -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}"
Expand All @@ -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

0 comments on commit f318381

Please sign in to comment.