mirror of https://github.com/docker/cli.git
Merge pull request #1713 from thaJeztah/fix_plugin_test
Fix: plugin-tests discarding current environment
This commit is contained in:
commit
651ccc0711
|
@ -106,7 +106,7 @@ func ensureBasicPluginBin() (string, error) {
|
||||||
}
|
}
|
||||||
installPath := filepath.Join(os.Getenv("GOPATH"), "bin", name)
|
installPath := filepath.Join(os.Getenv("GOPATH"), "bin", name)
|
||||||
cmd := exec.Command(goBin, "build", "-o", installPath, "./basic")
|
cmd := exec.Command(goBin, "build", "-o", installPath, "./basic")
|
||||||
cmd.Env = append(cmd.Env, "CGO_ENABLED=0")
|
cmd.Env = append(os.Environ(), "CGO_ENABLED=0")
|
||||||
if out, err := cmd.CombinedOutput(); err != nil {
|
if out, err := cmd.CombinedOutput(); err != nil {
|
||||||
return "", errors.Wrapf(err, "error building basic plugin bin: %s", string(out))
|
return "", errors.Wrapf(err, "error building basic plugin bin: %s", string(out))
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ function runtests {
|
||||||
TEST_SKIP_PLUGIN_TESTS="${SKIP_PLUGIN_TESTS-}" \
|
TEST_SKIP_PLUGIN_TESTS="${SKIP_PLUGIN_TESTS-}" \
|
||||||
GOPATH="$GOPATH" \
|
GOPATH="$GOPATH" \
|
||||||
PATH="$PWD/build/:/usr/bin:/usr/local/bin:/usr/local/go/bin" \
|
PATH="$PWD/build/:/usr/bin:/usr/local/bin:/usr/local/go/bin" \
|
||||||
|
HOME="$HOME" \
|
||||||
DOCKER_CLI_E2E_PLUGINS_EXTRA_DIRS="$PWD/build/plugins-linux-amd64" \
|
DOCKER_CLI_E2E_PLUGINS_EXTRA_DIRS="$PWD/build/plugins-linux-amd64" \
|
||||||
"$(command -v gotestsum)" -- ./e2e/... ${TESTFLAGS-}
|
"$(command -v gotestsum)" -- ./e2e/... ${TESTFLAGS-}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue