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": {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)
}
}