Skip to content
quarry Artifact [c8d80988ff]
Login

Artifact [c8d80988ff]

Artifact c8d80988ff8f2404cdfc9c99ed35a8a7b13ab39b97b1e76ee05b8e57c6f6813f:


package api

import "testing"

// #366: a merge whose every run was cancelled (or errored) has no
// verdict, and says so; one run still going or done is not that.
func TestAllCancelledIsAMergeNobodyJudged(t *testing.T) {
	if allCancelled(nil) {
		t.Error("FAIL: no runs read as all cancelled")
	}
	if !allCancelled([]CIRun{{Status: "cancelled"}, {Status: "error"}}) {
		t.Error("FAIL: cancelled and errored runs are not all cancelled")
	}
	if allCancelled([]CIRun{{Status: "cancelled"}, {Status: "completed"}}) {
		t.Error("FAIL: a completed run among cancelled ones read as all cancelled")
	}
}