SD-M2d sdk: a seat family on the shared events stream keeps no longer than the stream
Holds operator-channel's decided to the shared stream's 7 days (the lead's ruling of 12:5x), and each registry seat's family with it. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user