From e50bcd4a3bb99c29487a983372efe359055f1471 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 2 Sep 2026 04:09:20 -0400 Subject: [PATCH] fix: stop go-test-plugin from mutating plugin go.mod The target ran `go get github.com/onsi/gomega` inside the plugin module before every test run, which rewrote that plugin's `go.mod` and `go.sum` as a side effect of running tests. For a plugin that does not use gomega it added the module plus five transitive dependencies as unused indirect requirements, and for one that pins it the `go get` silently upgraded the pinned version, leaving the working tree dirty and fighting the dependency updates. The plugins whose tests use gomega already require it directly, and the test run passes `-mod=readonly`, so nothing needs to be fetched ahead of time. --- tests.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.mk b/tests.mk index 701ac2380..bc6463c49 100644 --- a/tests.mk +++ b/tests.mk @@ -191,7 +191,7 @@ go-tests: @$(MAKE) go-test-plugin PLUGIN_NAME=traefik-vhosts go-test-plugin: - cd plugins/$(PLUGIN_NAME) && go get github.com/onsi/gomega && DOKKU_ROOT=/home/dokku DOKKU_LIB_ROOT=/var/lib/dokku go test -v -p 1 -race -mod=readonly || exit $$? + cd plugins/$(PLUGIN_NAME) && DOKKU_ROOT=/home/dokku DOKKU_LIB_ROOT=/var/lib/dokku go test -v -p 1 -race -mod=readonly || exit $$? go-test-plugin-in-docker: @echo running go unit tests...