go.mod and go.sum move to mesh-sdk 14fd5cb68fd1, the commit on its main that holds go/catalogue, go/overlay and go/validate (ADR 0453 clause 2); vendor/modules.txt follows in the last of the six commits.
24 lines
705 B
Go
24 lines
705 B
Go
package broker
|
|
|
|
import (
|
|
"slices"
|
|
"testing"
|
|
|
|
"git.novox.be/novox/mesh-sdk/go/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)
|
|
}
|
|
}
|