From c6a895aff77a3fd5295ec1de7d4ca804e48bb411 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 18 Nov 2015 11:22:08 -0800 Subject: [PATCH] Fix executor tests --- client/driver/executor/exec_basic.go | 1 - client/driver/executor/test_harness_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/driver/executor/exec_basic.go b/client/driver/executor/exec_basic.go index 7c97760ea..8bf75c2ee 100644 --- a/client/driver/executor/exec_basic.go +++ b/client/driver/executor/exec_basic.go @@ -29,7 +29,6 @@ type BasicExecutor struct { allocDir string } -// TODO: Have raw_exec use this as well. func NewBasicExecutor() Executor { return &BasicExecutor{} } diff --git a/client/driver/executor/test_harness_test.go b/client/driver/executor/test_harness_test.go index 10cbac371..b5413700c 100644 --- a/client/driver/executor/test_harness_test.go +++ b/client/driver/executor/test_harness_test.go @@ -112,7 +112,7 @@ func Executor_Start_Wait(t *testing.T, command buildExecCommand) { expected := "hello world" file := filepath.Join(allocdir.TaskLocal, "output.txt") absFilePath := filepath.Join(taskDir, file) - cmd := fmt.Sprintf(`"%v \"%v\" > %v"`, "/bin/sleep 1 ; echo -n", expected, file) + cmd := fmt.Sprintf(`/bin/sleep 1 ; echo -n %v > %v`, expected, file) e := command("/bin/bash", "-c", cmd) if err := e.Limit(constraint); err != nil { @@ -190,7 +190,7 @@ func Executor_Open(t *testing.T, command buildExecCommand, newExecutor func() Ex expected := "hello world" file := filepath.Join(allocdir.TaskLocal, "output.txt") absFilePath := filepath.Join(taskDir, file) - cmd := fmt.Sprintf(`"%v \"%v\" > %v"`, "/bin/sleep 1 ; echo -n", expected, file) + cmd := fmt.Sprintf(`/bin/sleep 1 ; echo -n %v > %v`, expected, file) e := command("/bin/bash", "-c", cmd) if err := e.Limit(constraint); err != nil {