1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #42391 from thaJeztah/nomod

Disable go modules when compiling binaries used in tests
This commit is contained in:
Sebastiaan van Stijn 2021-05-20 21:19:40 +02:00 committed by GitHub
commit a6e51a7aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View file

@ -874,6 +874,7 @@ Try {
} else {
$env:DOCKER_HOST=$DASHH_CUT
$env:PATH="$env:TEMP\binary;$env:PATH;" # Force to use the test binaries, not the host ones.
$env:GO111MODULE="off"
Write-Host -ForegroundColor Green "INFO: DOCKER_HOST at $DASHH_CUT"
$ErrorActionPreference = "SilentlyContinue"

View file

@ -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)))
}

View file

@ -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)))
}

View file

@ -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))
}