Skip to content

Commit

Permalink
Bump version of Golang container to match module version
Browse files Browse the repository at this point in the history
The Go module for v2 is 1.19, bumping the base docker image to match the
minimum version ensures go-getter can be compiled and executed on the
container. This change resolves the failing acceptance test for Samba.

```
Run docker exec -i gogetter bash -c "env ACC_SMB_TEST=1 go test -v ./... -run=TestSmb_"
  docker exec -i gogetter bash -c "env ACC_SMB_TEST=1 go test -v ./... -run=TestSmb_"
  shell: /usr/bin/bash -e {0}
  env:
    TEST_RESULTS_PATH: /tmp/test-results
Error: ./get_git.go:366:16: undefined: os.ReadDir
Error: ./get_git_test.go:886:9: undefined: os.WriteFile
Error: ./get_git_test.go:904:22: undefined: os.ReadFile
note: module requires Go 1.19
FAIL	github.com/hashicorp/go-getter/v2 [build failed]
?   	github.com/hashicorp/go-getter/v2/helper/testing	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/go-getter/v2/helper/url	0.006s [no tests to run]
FAIL
Error: Process completed with exit code 2.

```
  • Loading branch information
nywilken committed Jun 28, 2024
1 parent b6203bd commit e1b32e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile to create a go-getter container with smbclient dependency that is used by the get_smb.go tests
FROM golang:1.15
FROM golang:1.19.13

COPY . /go-getter
WORKDIR /go-getter
Expand Down

0 comments on commit e1b32e6

Please sign in to comment.