Keep identity boot migrations out of historical upgrade fixtures
2 files changed,
+10
−0
internal/equipotest/execution_schema_test.go+6 −0internal/plan3test/plan3_upgrade_test.go+4 −0
CI cancelled — superseded by a newer push — run details
diff --git a/internal/equipotest/execution_schema_test.go b/internal/equipotest/execution_schema_test.go| index c0a37b34..65f4cf46 100644 |
| --- a/internal/equipotest/execution_schema_test.go |
| +++ b/internal/equipotest/execution_schema_test.go |
| @@ -468,6 +468,12 @@ func TestExecutionBackupIncludesArtifacts(t *testing.T) { |
| } |
| func schemaBefore(id, version string) bool { |
| + // Oficina ID stores arrived with 0082, after these historical snapshots. |
| + for _, prefix := range []string{"oficina_handoff/", "oficina_connect_link/", "equipo_identity/"} { |
| + if strings.HasPrefix(id, prefix) { |
| + return version >= "0082" |
| + } |
| + } |
| return !strings.HasPrefix(id, "equipo/") || strings.Split(strings.TrimPrefix(id, "equipo/"), "_")[0] <= version |
| } |
| func schemaAfter(version string) []string { |
diff --git a/internal/plan3test/plan3_upgrade_test.go b/internal/plan3test/plan3_upgrade_test.go| index d8ed59d1..c0ed0ce1 100644 |
| --- a/internal/plan3test/plan3_upgrade_test.go |
| +++ b/internal/plan3test/plan3_upgrade_test.go |
| @@ -27,6 +27,10 @@ func TestPlan3Upgrade(t *testing.T) { |
| defer func() { must(t, d.Close()) }() |
| before := &migrate.Set{} |
| for _, m := range equipo.BootSchema.All() { |
| + // These snapshots predate Oficina ID and its cross-store triggers. |
| + if strings.HasPrefix(m.ID, "oficina_handoff/") || strings.HasPrefix(m.ID, "oficina_connect_link/") || strings.HasPrefix(m.ID, "equipo_identity/") { |
| + continue |
| + } |
| if !strings.HasPrefix(m.ID, "equipo/") || version == "main" && m.ID == "equipo/0019_direct_reconcile" || strings.Split(strings.TrimPrefix(m.ID, "equipo/"), "_")[0] <= map[string]string{"0018": "0018", "0023": "0023", "main": "0018"}[version] { |
| before.Add(m) |
| } |