diff --git a/e2e/plugin/trust_test.go b/e2e/plugin/trust_test.go index 8dc3cad87a..36a602de8e 100644 --- a/e2e/plugin/trust_test.go +++ b/e2e/plugin/trust_test.go @@ -106,7 +106,7 @@ func ensureBasicPluginBin() (string, error) { } installPath := filepath.Join(os.Getenv("GOPATH"), "bin", name) 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 { return "", errors.Wrapf(err, "error building basic plugin bin: %s", string(out)) } diff --git a/scripts/test/e2e/run b/scripts/test/e2e/run index 7a401db9ce..173397a703 100755 --- a/scripts/test/e2e/run +++ b/scripts/test/e2e/run @@ -69,6 +69,7 @@ function runtests { TEST_SKIP_PLUGIN_TESTS="${SKIP_PLUGIN_TESTS-}" \ GOPATH="$GOPATH" \ PATH="$PWD/build/:/usr/bin" \ + HOME="$HOME" \ "$(which go)" test -v ./e2e/... ${TESTFLAGS-} }