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
31 lines
837 B
Go
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")
|
|
}
|