diff --git a/go/buscompose/userlist_switch_integration_test.go b/go/buscompose/userlist_switch_integration_test.go index a2ec1d8..d8eb3fd 100644 --- a/go/buscompose/userlist_switch_integration_test.go +++ b/go/buscompose/userlist_switch_integration_test.go @@ -78,10 +78,17 @@ func TestTheBusNodeFollowsTheGrantsPartsSealedListUnderTheComposedGrants(t *test if err != nil { t.Fatal(err) } - kv, err := grants.CreateKeyValue(ctx, jetstream.KeyValueConfig{Bucket: GrantsUserListBucket}) - if err != nil { + // Its state is made as the grants part makes a declared state, by its stream's name (CreateKeyValue would ask the + // account's info, which no module is granted). + if _, err := grants.CreateStream(ctx, jetstream.StreamConfig{Name: "KV_" + GrantsUserListBucket, + Subjects: []string{"$KV." + GrantsUserListBucket + ".>"}, MaxMsgsPerSubject: 1, AllowDirect: true, + AllowRollup: true, DenyDelete: true, Discard: jetstream.DiscardNew}); err != nil { t.Fatalf("the grants part's state: %v", err) } + kv, err := grants.KeyValue(ctx, GrantsUserListBucket) + if err != nil { + t.Fatalf("the grants part binds its state: %v", err) + } objects, err := grants.CreateObjectStore(ctx, jetstream.ObjectStoreConfig{Bucket: GrantsUserListObjects}) if err != nil { t.Fatalf("the grants part's object bucket: %v", err)