feat(assessment): assign the demonstration category and keep result history

This commit is contained in:
shira committed 2026-10-09 00:35:13 +03:00
1 parent b3c6dc870b
commit 8277133712
61 files changed
+4338 -268

No files matched your search

+8
View File
@@ -353,6 +353,10 @@ func TestOrganizationNeedsStorage(t *testing.T) {
})
}
// needCreationResultMigrationVersion is the migration that creates
// organization_need_creation_results.
const needCreationResultMigrationVersion = 26
func TestNeedCreationResultMigrationRollbackPreflight(t *testing.T) {
env := bootstrap(t, postgresService)
ctx, cancel := context.WithTimeout(t.Context(), organizationTestTimeout)
@@ -362,6 +366,10 @@ func TestNeedCreationResultMigrationRollbackPreflight(t *testing.T) {
if _, err := migrator.Up(ctx); err != nil {
t.Fatalf("apply migrations to rollback test database: %v", err)
}
// The preflight belongs to the migration that created the replay table, so
// the migrations added after it are rolled back first. The database holds
// no data yet, which keeps their own guarded rollbacks out of this test.
rollBackAboveMigration(ctx, t, migrator, needCreationResultMigrationVersion)
pool := newPoolFor(ctx, t, databaseURL)
now := time.Now().UTC().Truncate(time.Microsecond)
fixture := organizationFixture{