git » chasquid » commit e7a5a48

test: Update Dockerfile to the new "go get" restrictions

author Alberto Bertogli
2021-02-18 02:10:13 UTC
committer Alberto Bertogli
2021-02-18 02:10:13 UTC
parent 5305d584188aaeab74cff874ad99164d5668ca37

test: Update Dockerfile to the new "go get" restrictions

In Go 1.16, "go get" on non-module paths now require an explicit version
to point to.  Without a specific version, the invocation fails.

See https://golang.org/doc/go1.16#go-command for more details on the
change.

The test Dockerfile uses "go get" to fetch driusan/dkim's binaries, used
for integration testing.

So this patch adjusts the Dockerfile to fetch the latest version.

test/Dockerfile +3 -4

diff --git a/test/Dockerfile b/test/Dockerfile
index 352966a..b34da0d 100644
--- a/test/Dockerfile
+++ b/test/Dockerfile
@@ -39,10 +39,9 @@ RUN mkdir -p test/t-02-exim/.exim4 \
 RUN chmod g-s /usr/bin/msmtp
 
 # Install binaries for the (optional) DKIM integration test.
-RUN go get github.com/driusan/dkim/... \
-	&& go install github.com/driusan/dkim/cmd/dkimsign \
-	&& go install github.com/driusan/dkim/cmd/dkimverify \
-	&& go install github.com/driusan/dkim/cmd/dkimkeygen
+RUN go install github.com/driusan/dkim/cmd/dkimsign@latest \
+	&& go install github.com/driusan/dkim/cmd/dkimverify@latest \
+	&& go install github.com/driusan/dkim/cmd/dkimkeygen@latest
 
 # Copy into the container. Everything below this line will not be cached.
 COPY . .