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.
17 lines
538 B
Go
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)
|
|
}
|
|
}
|