mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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>
(cherry picked from commit 7070df3a3e
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
09a7efb1f7
commit
8b0913935c
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