diff --git a/client/driver/rkt_test.go b/client/driver/rkt_test.go index c2bbd600c..76f2bce09 100644 --- a/client/driver/rkt_test.go +++ b/client/driver/rkt_test.go @@ -207,11 +207,11 @@ func TestRktDriver_Start_Wait_AllocDir(t *testing.T) { task := &structs.Task{ Name: "alpine", Config: map[string]interface{}{ - "image": "docker://alpine", - "command": "/bin/sh", - "args": []string{ - "-c", - fmt.Sprintf(`echo -n %s > ${%s}/%s`, string(exp), env.AllocDir, file), + "image": "docker://alpine", + "command": "/bin/sh", + "args": []string{ + "-c", + fmt.Sprintf(`echo -n %s > ${%s}/%s`, string(exp), env.AllocDir, file), }, }, LogConfig: &structs.LogConfig{ @@ -247,13 +247,13 @@ func TestRktDriver_Start_Wait_AllocDir(t *testing.T) { } // Check that data was written to the shared alloc directory. - outputFile := filepath.Join(execCtx.AllocDir.SharedDir, file) - act, err := ioutil.ReadFile(outputFile) - if err != nil { - t.Fatalf("Couldn't read expected output: %v", err) - } + outputFile := filepath.Join(execCtx.AllocDir.SharedDir, file) + act, err := ioutil.ReadFile(outputFile) + if err != nil { + t.Fatalf("Couldn't read expected output: %v", err) + } - if !reflect.DeepEqual(act, exp) { - t.Fatalf("Command output is %v; expected %v", act, exp) - } + if !reflect.DeepEqual(act, exp) { + t.Fatalf("Command output is %v; expected %v", act, exp) + } } diff --git a/nomad/plan_apply.go b/nomad/plan_apply.go index 52c575b14..5dc668f99 100644 --- a/nomad/plan_apply.go +++ b/nomad/plan_apply.go @@ -59,14 +59,6 @@ func (s *Server) planApply() { return } - // Verify the evaluation is outstanding, and that the tokens match. - if err := s.evalBroker.OutstandingReset(pending.plan.EvalID, pending.plan.EvalToken); err != nil { - s.logger.Printf("[ERR] nomad: plan rejected for evaluation %s: %v", - pending.plan.EvalID, err) - pending.respond(nil, err) - continue - } - // Check if out last plan has completed select { case <-waitCh: