diff --git a/modules/distribution/internal/holder/holder_test.go b/modules/distribution/internal/holder/holder_test.go index eb7026021..d3cbe2bac 100644 --- a/modules/distribution/internal/holder/holder_test.go +++ b/modules/distribution/internal/holder/holder_test.go @@ -835,6 +835,10 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) { Resources []map[string]any `json:"resources"` Consumes []string `json:"consumes"` Packages map[string]string `json:"packages"` + Listens []struct { + Name string `json:"name"` + Port int `json:"port"` + } `json:"listens"` } if err := json.Unmarshal(raw, &m); err != nil { t.Fatal(err) @@ -893,8 +897,15 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) { if len(m.Listens) != 1 || m.Listens[0].Port != 5100 { t.Fatalf("listens = %+v, want registry on 5100, where every machine fetches", m.Listens) } - if at, mayAssign := m.MachineSide(5100); at != 5100 || mayAssign { - t.Errorf("the machine side of 5100 = %d (may assign %v), want 5100 bound by the program, named by no container", at, mayAssign) + for _, r := range m.Resources { + ports, _ := r["ports"].([]any) + for _, p := range ports { + for _, side := range strings.Split(fmt.Sprint(p), ":") { + if side == "5100" { + t.Errorf("%v maps %v: want 5100 bound by the program, named by no container", r["id"], p) + } + } + } } // Running review F2: incoming asks the bus 8 GiB, the most the objects template allows, equal to IncomingCap // (said only where no binding is read); transfers keeps for good, the holder dropping an idle one by its key