Skip to content

Commit 7ab0895

Browse files
committed
resolve deprecated BindMount function call
1 parent 4821b4e commit 7ab0895

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

internal/test/compilecheck/compile_check_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"strings"
1616
"testing"
1717

18+
"github.com/docker/docker/api/types/container"
1819
"github.com/stretchr/testify/assert"
1920
"github.com/stretchr/testify/require"
2021
"github.com/testcontainers/testcontainers-go"
@@ -46,12 +47,12 @@ func TestCompileCheck(t *testing.T) {
4647
t.Parallel()
4748

4849
req := testcontainers.ContainerRequest{
49-
Image: image,
50-
Cmd: []string{"tail", "-f", "/dev/null"},
51-
Mounts: []testcontainers.ContainerMount{
52-
testcontainers.BindMount(rootDir, "/workspace"),
53-
},
50+
Image: image,
51+
Cmd: []string{"tail", "-f", "/dev/null"},
5452
WorkingDir: "/workspace",
53+
HostConfigModifier: func(hostConfig *container.HostConfig) {
54+
hostConfig.Binds = []string{fmt.Sprintf("%s:/workspace", rootDir)}
55+
},
5556
Env: map[string]string{
5657
"GC": "go",
5758
// Compilation modules are not part of the workspace as testcontainers requires

0 commit comments

Comments
 (0)