diff --git a/client/driver/executor/executor_linux_test.go b/client/driver/executor/executor_linux_test.go index 1ce7730ae..ac9c62b5c 100644 --- a/client/driver/executor/executor_linux_test.go +++ b/client/driver/executor/executor_linux_test.go @@ -40,7 +40,7 @@ func testExecutorContextWithChroot(t *testing.T) (*ExecutorContext, *allocdir.Al alloc := mock.Alloc() task := alloc.Job.TaskGroups[0].Tasks[0] - allocDir := allocdir.NewAllocDir(filepath.Join(os.TempDir(), alloc.ID)) + allocDir := allocdir.NewAllocDir(testLogger(), filepath.Join(os.TempDir(), alloc.ID)) if err := allocDir.Build(); err != nil { log.Fatalf("AllocDir.Build() failed: %v", err) } diff --git a/client/driver/executor/executor_test.go b/client/driver/executor/executor_test.go index c4687645c..525c86233 100644 --- a/client/driver/executor/executor_test.go +++ b/client/driver/executor/executor_test.go @@ -34,6 +34,10 @@ var ( } ) +func testLogger() *log.Logger { + return log.New(os.Stderr, "", log.LstdFlags) +} + // testExecutorContext returns an ExecutorContext and AllocDir. // // The caller is responsible for calling AllocDir.Destroy() to cleanup. @@ -42,7 +46,7 @@ func testExecutorContext(t *testing.T) (*ExecutorContext, *allocdir.AllocDir) { alloc := mock.Alloc() task := alloc.Job.TaskGroups[0].Tasks[0] - allocDir := allocdir.NewAllocDir(filepath.Join(os.TempDir(), alloc.ID)) + allocDir := allocdir.NewAllocDir(testLogger(), filepath.Join(os.TempDir(), alloc.ID)) if err := allocDir.Build(); err != nil { log.Fatalf("AllocDir.Build() failed: %v", err) }