Pass the env in properly

pull/6111/head
tstromberg 2019-12-17 15:34:47 -08:00
parent de4b9b65fb
commit 896f96dfc4
1 changed files with 3 additions and 1 deletions

View File

@ -44,11 +44,13 @@ func TestOffline(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
defer CleanupWithLogs(t, profile, cancel)
startArgs := append([]string{"start", "-p", profile, "--alsologtostderr", "-v=1", "--wait=true", "--container-runtime", runtime})
startArgs := []string{"start", "-p", profile, "--alsologtostderr", "-v=1", "--wait=true", "--container-runtime", runtime}
startArgs = append(startArgs, StartArgs()...)
c := exec.CommandContext(ctx, Target(), startArgs...)
env := os.Environ()
env = append(env, "HTTP_PROXYS=172.1.1.1")
env = append(env, "DOCKER_HOST=172.1.1.1")
c.Env = env
rr, err := Run(t, c)
if err != nil {
// Fatal so that we may collect logs before stop/delete steps