//go:build integration package main import ( "slices" "testing" "git.novox.be/novox/mesh-sdk/go/catalogue" ) // **The controller opens on a store after release 6's migrations, which drop nothing the controller of before reads** (issue // 1945, review round 1): it assigns a module, reads where it runs and the nodes. Release 6 reads none of the plans' tables. func TestTheControllerOpensOnTheStoreAfterReleaseSix(t *testing.T) { open := aMesh(t) ctx := t.Context() inv := open.inventory register(t, open, catalogue.Manifest{Module: "notes", Version: "1"}) if _, err := assign(ctx, open, "anchor", "notes"); err != nil { t.Fatalf("assign on the migrated store: %v", err) } if on, err := inv.Assigned(ctx, "anchor"); err != nil || !slices.Contains(on, "notes") { t.Fatalf("assigned %v, want notes among them (an assignment may bring the modules it needs): %v", on, err) } if nodes, err := inv.Nodes(ctx); err != nil || len(nodes) == 0 { t.Fatalf("nodes %v: %v", nodes, err) } }