Skip to content

Commit

Permalink
using new ctx instead of getting both params back
Browse files Browse the repository at this point in the history
  • Loading branch information
camerondavison committed Jan 10, 2017
1 parent 2d6e7e7 commit d4b8fc9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions client/driver/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,14 +703,13 @@ func TestDockerDriver_ForcePull_IsInvalidConfig(t *testing.T) {
task, _, _ := dockerTask()
task.Config["force_pull"] = "nothing"

driverCtx, execCtx := testDriverContexts(task)
driverCtx.config.Options = map[string]string{"docker.cleanup.image": "false"}
driver := NewDockerDriver(driverCtx)
if err := driver.Prestart(execCtx, task); err == nil {
execCtx.AllocDir.Destroy()
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
ctx.DriverCtx.config.Options = map[string]string{"docker.cleanup.image": "false"}
driver := NewDockerDriver(ctx.DriverCtx)

if err := driver.Prestart(ctx.ExecCtx, task); err == nil {
t.Fatalf("error expected in prestart")
} else {
execCtx.AllocDir.Destroy()
}
}

Expand Down

0 comments on commit d4b8fc9

Please sign in to comment.