17 lines
549 B
Go
17 lines
549 B
Go
package inventory
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/novox/mesh-controller/internal/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)
|
|
}
|
|
}
|