Skip to content
quarry Artifact [beabf4a600]
Login

Artifact [beabf4a600]

Artifact beabf4a6000ed401445d8d9f80735569197c73aa1642f577d71aab8f5fabab4e:


package api

import "testing"

// The probe warm-up walks open landings and skips what it cannot ask:
// a repository without a zit client, or a landing whose tips the index
// does not know. It must never panic on a half-registered fleet.
func TestWarmMergeProbesSkipsWhatItCannotAsk(t *testing.T) {
	d := Deps{Repos: NewRepos(map[string]*Repo{"bare": {}, "indexed": {Chat: "indexed", Index: nil}})}
	if n := d.WarmMergeProbes(); n != 0 {
		t.Fatalf("probed %d landings with no zit client", n)
	}
	var none Deps
	if n := none.WarmMergeProbes(); n != 0 {
		t.Fatalf("probed %d with no repositories", n)
	}
}