Skip to content
quarry Artifact [f06e5ccb8e]
Login

Artifact [f06e5ccb8e]

Artifact f06e5ccb8e5342827b8222e4394ac3470f72034eead500d4cbedfc84ee52fce7:


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)
	}
}