fix: execute go get/build with mod in readonly mode
This will avoid issues where a build or test will inadvertently update dependencies, causing drift between what is in code and what is being tested/run.
This commit is contained in:
2
tests.mk
2
tests.mk
@@ -182,7 +182,7 @@ go-test-plugin:
|
||||
-v $$PWD:$(GO_REPO_ROOT) \
|
||||
-w $(GO_REPO_ROOT) \
|
||||
$(BUILD_IMAGE) \
|
||||
bash -c "cd plugins/$(PLUGIN_NAME) && go get github.com/onsi/gomega && go test -v -p 1 -race " || exit $$?
|
||||
bash -c "cd plugins/$(PLUGIN_NAME) && go get github.com/onsi/gomega && go test -v -p 1 -race -mod=readonly " || exit $$?
|
||||
|
||||
unit-tests: go-tests
|
||||
@echo running bats unit tests...
|
||||
|
||||
Reference in New Issue
Block a user