mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
use last job eval if multiple exist, when looking for registration
This commit is contained in:
@@ -374,7 +374,9 @@ func TestHTTP_JobEvaluations(t *testing.T) {
|
||||
|
||||
// Check the response
|
||||
evals := obj.([]*structs.Evaluation)
|
||||
if len(evals) != 1 || evals[0].ID != resp.EvalID {
|
||||
// Can be multiple evals, use the last one, since they are in order
|
||||
idx := len(evals) - 1
|
||||
if len(evals) > 0 || evals[idx].ID != resp.EvalID {
|
||||
t.Fatalf("bad: %v", evals)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user