Files
mesh-controller/internal/inventory/state_keyttl_test.go
T
mesh-tools af267cb557 Take the catalogue from mesh-sdk in internal/inventory and internal/link, and keep the tests that read this repository's own manifest, Dockerfile and Makefile in internal/ownmanifest (issue 1381, 5 of 6 import swaps)
The three tests of the controller's own module.json (process, claimed seat, addresses), the Dockerfile and Makefile pin test, the build-agent registry test and the manifest-in-use seat test move with their old package, as tests of mesh-sdk's exported API; a moved test is exempt from failing first.
2026-10-20 08:27:10 +00:00

17 lines
538 B
Go

package inventory
import (
"testing"
"git.novox.be/novox/mesh-sdk/go/catalogue"
)
// 1154/AC2: a module's state with key-ttl is composed into a bucket that carries KeyTTL; without it, none.
func TestAKeyTTLStateIsComposedIntoABucketThatSaysSo(t *testing.T) { // 1154/AC2
got := bucketsOf(catalogue.Manifest{Module: "mesh-delivery-watchman",
State: []catalogue.StateDeclaration{{Name: "pulse", KeyTTL: true}, {Name: "stuck"}}})
if len(got) != 2 || !got[0].KeyTTL || got[1].KeyTTL {
t.Fatalf("buckets composed as %+v", got)
}
}