Keep every column and table the controller of before reads: no migration 0108-0110, and a test that its queries still run (release 6, issue 1945 review H1)
This commit is contained in:
@@ -3,25 +3,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
||||
)
|
||||
|
||||
// **The controller opens on a store whose plan tables are gone** (novox/hq ADR 0539 §17, issue 1945 B9): migration 0108 has
|
||||
// dropped the record of sends, the assignment generation, the gate's verdicts and the durations, and the controller still
|
||||
// assigns a module, reads where it runs, takes it off and reads the nodes.
|
||||
func TestTheControllerOpensOnAStoreWithoutThePlanTables(t *testing.T) {
|
||||
// **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
|
||||
for _, row := range inv.QueryForTest(t, `select table_name::text from information_schema.tables where table_schema = 'public'`) {
|
||||
switch name := strings.Trim(row[0], `"`); name {
|
||||
case "declaration_send", "assignment_generation", "build_gate", "duration":
|
||||
t.Errorf("the table %s is in the store", name)
|
||||
}
|
||||
}
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user