Skip to content

Commit 082fb9b

Browse files
committed
Changes done on makefile and test.sh with creation of go.work
1 parent 9306838 commit 082fb9b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
44
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
55
ENVTEST_K8S_VERSION = 1.33.2
66

7-
ENVTEST = go run ${PROJECT_DIR}/vendor/sigs.k8s.io/controller-runtime/tools/setup-envtest
8-
GOLANGCI_LINT = go run ${PROJECT_DIR}/vendor/github.com/golangci/golangci-lint/cmd/golangci-lint
7+
ENVTEST = GOWORK=off go run ${PROJECT_DIR}/vendor/sigs.k8s.io/controller-runtime/tools/setup-envtest
8+
GOLANGCI_LINT = GOWORK=off go run ${PROJECT_DIR}/vendor/github.com/golangci/golangci-lint/cmd/golangci-lint
99

1010
HOME ?= /tmp/kubebuilder-testing
1111
ifeq ($(HOME), /)
@@ -29,7 +29,7 @@ build: operator migration manifests-gen
2929
.PHONY: manifests-gen
3030
manifests-gen:
3131
# building manifests-gen
32-
cd manifests-gen && go build -o ../bin/manifests-gen && cd ..
32+
cd manifests-gen && GOWORK=off go build -o ../bin/manifests-gen && cd ..
3333

3434
operator:
3535
# building cluster-capi-operator

hack/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ fi
3434

3535
# Print the command we are going to run as Make would.
3636
echo ${GINKGO} ${GINKGO_ARGS} ${GINKGO_EXTRA_ARGS} ${TEST_DIRS}
37+
export GOWORK=off
3738
${GINKGO} ${GINKGO_ARGS} ${GINKGO_EXTRA_ARGS} ${TEST_DIRS}
3839
# Capture the test result to exit on error after coverage.
3940
TEST_RESULT=$?

0 commit comments

Comments
 (0)