Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Mar 25, 2016
1 parent f33bd97 commit 3698bca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions api/jobs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ func TestJobs_Deregister(t *testing.T) {
assertWriteMeta(t, wm)

// Attempting delete on non-existing job returns an error
if _, _, err = jobs.Deregister("nope", nil); err == nil {
t.Fatalf("expected error deregistering job")
if _, _, err = jobs.Deregister("nope", nil); err != nil {
t.Fatalf("unexpected error deregistering job: %v", err)

}

// Deleting an existing job works
Expand Down
2 changes: 1 addition & 1 deletion nomad/job_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (j *Job) Evaluate(args *structs.JobEvaluateRequest, reply *structs.JobRegis
if err != nil {
return err
}
if job != nil && job.IsPeriodic() {
if job == nil {
return fmt.Errorf("job not found")
}

Expand Down

0 comments on commit 3698bca

Please sign in to comment.