Build steps: test the ask key with a real ask id (issue 1890)

This commit is contained in:
2026-10-26 13:43:05 +01:00
parent 6b1c7a5613
commit e66c6fea62
+2 -2
View File
@@ -60,7 +60,7 @@ func TestEndStaleAndEndOne(t *testing.T) {
_, _ = k.put(key, json.RawMessage(mustStep(t, delivery.Step{ID: id, Tool: tool, Node: node, State: state, Started: started}))) _, _ = k.put(key, json.RawMessage(mustStep(t, delivery.Step{ID: id, Tool: tool, Node: node, State: state, Started: started})))
} }
put("ace", "old1", "build_go_fetch", delivery.StepRunning, boot.Add(-time.Hour)) put("ace", "old1", "build_go_fetch", delivery.StepRunning, boot.Add(-time.Hour))
put("ace", "askold", "check ask", delivery.StepRunning, boot.Add(-time.Hour)) put("ace", "mjk3l9x0abcdef", "check ask", delivery.StepRunning, boot.Add(-time.Hour))
put("ace", "raced1", "build_go_test", delivery.StepRunning, boot.Add(-time.Hour)) put("ace", "raced1", "build_go_test", delivery.StepRunning, boot.Add(-time.Hour))
put("ace", "new1", "build_go_fetch", delivery.StepRunning, boot.Add(time.Second)) put("ace", "new1", "build_go_fetch", delivery.StepRunning, boot.Add(time.Second))
put("ace", "done1", "build_go_fetch", delivery.StepPassed, boot.Add(-time.Hour)) put("ace", "done1", "build_go_fetch", delivery.StepPassed, boot.Add(-time.Hour))
@@ -80,7 +80,7 @@ func TestEndStaleAndEndOne(t *testing.T) {
if s := k.last("ace.old1"); s.State != delivery.StepFailed || s.Reason != RestartReason || s.Ended.IsZero() { if s := k.last("ace.old1"); s.State != delivery.StepFailed || s.Reason != RestartReason || s.Ended.IsZero() {
t.Errorf("old1 = %+v", s) t.Errorf("old1 = %+v", s)
} }
for key, state := range map[string]string{"ace.askold": delivery.StepRunning, "ace.raced1": delivery.StepPassed, "ace.new1": delivery.StepRunning, "ace.done1": delivery.StepPassed, "g14.other1": delivery.StepRunning} { for key, state := range map[string]string{"ace.mjk3l9x0abcdef": delivery.StepRunning, "ace.raced1": delivery.StepPassed, "ace.new1": delivery.StepRunning, "ace.done1": delivery.StepPassed, "g14.other1": delivery.StepRunning} {
if s := k.last(key); s.State != state { if s := k.last(key); s.State != state {
t.Errorf("%s = %s, want %s", key, s.State, state) t.Errorf("%s = %s, want %s", key, s.State, state)
} }