integration: ensurePlugin: disable go modules when building plugin
=== RUN TestServicePlugin plugin_test.go:42: assertion failed: error is not nil: error building basic plugin bin: no required module provides package github.com/docker/docker/testutil/fixtures/plugin/basic: go.mod file not found in current directory or any parent directory; see 'go help modules' : exit status 1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8bae2278ba
commit
7070df3a3e
3 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@ func ensurePlugin(t *testing.T, name string) string {
|
|||
}
|
||||
|
||||
cmd := exec.Command(goBin, "build", "-o", installPath, "./"+filepath.Join("cmd", name))
|
||||
cmd.Env = append(os.Environ(), "CGO_ENABLED=0")
|
||||
cmd.Env = append(os.Environ(), "CGO_ENABLED=0", "GO111MODULE=off")
|
||||
if out, err := cmd.CombinedOutput(); err != nil {
|
||||
t.Fatal(errors.Wrapf(err, "error building basic plugin bin: %s", string(out)))
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ func ensurePlugin(t *testing.T, name string) string {
|
|||
assert.NilError(t, err)
|
||||
|
||||
cmd := exec.Command(goBin, "build", "-o", installPath, "./"+filepath.Join("cmd", name))
|
||||
cmd.Env = append(os.Environ(), "CGO_ENABLED=0")
|
||||
cmd.Env = append(os.Environ(), "CGO_ENABLED=0", "GO111MODULE=off")
|
||||
if out, err := cmd.CombinedOutput(); err != nil {
|
||||
t.Fatal(errors.Wrapf(err, "error building basic plugin bin: %s", string(out)))
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ func ensureBasicPluginBin() (string, error) {
|
|||
installPath := filepath.Join(os.Getenv("GOPATH"), "bin", name)
|
||||
sourcePath := filepath.Join("github.com", "docker", "docker", "testutil", "fixtures", "plugin", "basic")
|
||||
cmd := exec.Command(goBin, "build", "-o", installPath, sourcePath)
|
||||
cmd.Env = append(os.Environ(), "CGO_ENABLED=0")
|
||||
cmd.Env = append(os.Environ(), "CGO_ENABLED=0", "GO111MODULE=off")
|
||||
if out, err := cmd.CombinedOutput(); err != nil {
|
||||
return "", errors.Wrapf(err, "error building basic plugin bin: %s", string(out))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue