Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

fix(ci): let the migration guard fail in one job, not two (#721)

Tássio Noronhaca1256c8b049
diff --git a/backend/tests/test_migration_chain.py b/backend/tests/test_migration_chain.py
index c342d3c9..7010eb30 100644
--- a/backend/tests/test_migration_chain.py
+++ b/backend/tests/test_migration_chain.py
@@ -4,6 +4,11 @@ The guard exists because two branches can each pick the same next revision
number and stay green until they are both on main, where `alembic upgrade
head` then refuses to run. These build that situation on disk and assert the
guard reports it.
+
+Every case is synthetic, under tmp_path. The repository's own chain is checked
+by the Migration Chain CI job, not from here: a real clash belongs to that job
+alone, so it is not also reported as a backend test failure in a suite that has
+nothing to do with it.
"""
import importlib.util
@@ -118,8 +123,3 @@ def test_empty_directory_is_reported(tmp_path: Path):
empty.mkdir()
assert any("no migration files found" in p for p in check(empty))
-
-
-def test_the_repository_chain_is_sound():
- """The guard's own subject: this repo's real migrations."""
- assert check(check_migration_chain.VERSIONS_DIR) == []