diff --git a/client/driver/executor/executor_linux_test.go b/client/driver/executor/executor_linux_test.go index ab5dc6a84..b37bc6381 100644 --- a/client/driver/executor/executor_linux_test.go +++ b/client/driver/executor/executor_linux_test.go @@ -37,9 +37,9 @@ func testExecutorContextWithChroot(t *testing.T) (*ExecutorContext, *allocdir.Al "/foobar": "/does/not/exist", } - taskEnv := env.NewTaskEnvironment(mock.Node()) alloc := mock.Alloc() task := alloc.Job.TaskGroups[0].Tasks[0] + taskEnv := env.NewBuilder(mock.Node(), alloc, task, "global").Build() allocDir := allocdir.NewAllocDir(testLogger(), filepath.Join(os.TempDir(), alloc.ID)) if err := allocDir.Build(); err != nil { diff --git a/client/driver/executor/executor_test.go b/client/driver/executor/executor_test.go index 51325e09a..846feef97 100644 --- a/client/driver/executor/executor_test.go +++ b/client/driver/executor/executor_test.go @@ -40,9 +40,9 @@ func testLogger() *log.Logger { // // The caller is responsible for calling AllocDir.Destroy() to cleanup. func testExecutorContext(t *testing.T) (*ExecutorContext, *allocdir.AllocDir) { - taskEnv := env.NewTaskEnvironment(mock.Node()) alloc := mock.Alloc() task := alloc.Job.TaskGroups[0].Tasks[0] + taskEnv := env.NewBuilder(mock.Node(), alloc, task, "global").Build() allocDir := allocdir.NewAllocDir(testLogger(), filepath.Join(os.TempDir(), alloc.ID)) if err := allocDir.Build(); err != nil {