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") }