diff --git a/go/buscompose/names_test.go b/go/buscompose/names_test.go index 25934e2..6f4bd17 100644 --- a/go/buscompose/names_test.go +++ b/go/buscompose/names_test.go @@ -4,7 +4,12 @@ import ( "strings" "testing" + "git.novox.be/novox/mesh-contracts/go/seats/containerimageregistry" + "git.novox.be/novox/mesh-contracts/go/seats/gopackageregistry" "git.novox.be/novox/mesh-contracts/go/seats/meshbroker" + "git.novox.be/novox/mesh-contracts/go/seats/npmpackageregistry" + "git.novox.be/novox/mesh-contracts/go/seats/ociartifactregistry" + "git.novox.be/novox/mesh-contracts/go/seats/operatorchannel" "git.novox.be/novox/mesh-sdk/go/membership" ) @@ -43,6 +48,17 @@ func TestTheBusNamesAgree(t *testing.T) { } } } + // A seat family on the shared events stream is kept as long as the stream keeps it: its contract says no more. + for family, days := range map[string]int{operatorchannel.Family: operatorchannel.FamilyMaxAgeDays, + npmpackageregistry.Family: npmpackageregistry.FamilyMaxAgeDays, gopackageregistry.Family: gopackageregistry.FamilyMaxAgeDays, + containerimageregistry.Family: containerimageregistry.FamilyMaxAgeDays, + ociartifactregistry.Family: ociartifactregistry.FamilyMaxAgeDays} { + for _, st := range MeshStreams() { + if st.Name == EventsStream && int64(days)*24*60*60 != int64(st.MaxAge) { + t.Errorf("the family %s says %d days, the shared events stream keeps %d s", family, days, st.MaxAge) + } + } + } } // subjectTakes says whether a subject pattern (`*` one token, `>` the rest) takes a subject.