package broker import ( "slices" "testing" "github.com/novox/mesh-controller/internal/catalogue" ) // The catalogue's list of the mesh's own stream names, which a module's stream may not take, is the broker's // own list (novox/hq ADR 0363 ยง1): read from MeshStreams, so a stream added there cannot be forgotten there. func TestTheCataloguesReservedStreamNamesAreTheMeshsOwn(t *testing.T) { var own []string for _, s := range MeshStreams() { own = append(own, s.Name) } reserved := append([]string(nil), catalogue.MeshStreamNames...) slices.Sort(own) slices.Sort(reserved) if !slices.Equal(own, reserved) { t.Fatalf("the broker's own streams are %v, the catalogue reserves %v", own, reserved) } }