Files
mesh-host/packaging/bounds_state_test.go
T
jschoubben 7c7b5e2d68 G A-92: the node-engine's manifest declares the state bounds, a lifetime per key, in its old section
Builds: design 47 G §560, §557, §627, A-77, A-92
(the seat definition: mesh-contracts 2ae0c679304b828a3973dd23ecd19861577d141d)

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-11 23:48:16 +01:00

31 lines
837 B
Go

package packaging_test
import (
"os"
"testing"
"git.novox.be/novox/mesh-sdk/go/catalogue"
)
// The node-engine's waits run against bound keys with their own time to live, in its old section as its other states are
// (design 47 G A-92, §560, §627): the manifest declares the state bounds with a lifetime per key.
func TestTheManifestDeclaresTheBoundsStateWithAKeyLifetime(t *testing.T) {
raw, err := os.ReadFile("../module.json")
if err != nil {
t.Fatal(err)
}
m, err := catalogue.Decode(raw)
if err != nil {
t.Fatalf("the manifest no longer parses: %v", err)
}
for _, s := range m.State {
if s.Name == "bounds" {
if !s.KeyTTL || s.History != 1 {
t.Fatalf("the state bounds is %+v: one value a key, each key with its own lifetime", s)
}
return
}
}
t.Fatal("the manifest declares no state bounds")
}