summaryrefslogtreecommitdiff
path: root/tests/test_migrations.py
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-11 13:58:01 -0500
committerChristian Cleberg <[email protected]>2026-04-11 13:58:01 -0500
commit6149ca9c394df7d316f80db05ad0fc2aea6c550d (patch)
tree11f6cebc445e14b4a79adae648eb46d4be710071 /tests/test_migrations.py
parentb6d1348abf907b8b9c16ab87487eb9384dc4cc89 (diff)
downloadhutch-stats-6149ca9c394df7d316f80db05ad0fc2aea6c550d.tar.gz
hutch-stats-6149ca9c394df7d316f80db05ad0fc2aea6c550d.tar.bz2
hutch-stats-6149ca9c394df7d316f80db05ad0fc2aea6c550d.zip
feat: add lazy actor indexing for contribution lookups
Diffstat (limited to 'tests/test_migrations.py')
-rw-r--r--tests/test_migrations.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_migrations.py b/tests/test_migrations.py
index d572af2..505ddb3 100644
--- a/tests/test_migrations.py
+++ b/tests/test_migrations.py
@@ -22,6 +22,7 @@ def test_alembic_upgrade_creates_schema(tmp_path) -> None:
"alembic_version",
"contribution_events",
"sync_states",
+ "tracked_actors",
"tracked_repositories",
]
@@ -115,6 +116,7 @@ def test_alembic_upgrade_adopts_legacy_schema(tmp_path) -> None:
assert columns["actor"]["nullable"] is False
assert "uq_tracked_repository_service_actor_name" in unique_constraints
assert actor == Settings().default_actor
+ assert "tracked_actors" in inspector.get_table_names()
def test_alembic_prefers_database_url_from_environment(tmp_path, monkeypatch) -> None:
@@ -128,3 +130,4 @@ def test_alembic_prefers_database_url_from_environment(tmp_path, monkeypatch) ->
inspector = inspect(create_engine(database_url))
assert "actor_aliases" in inspector.get_table_names()
+ assert "tracked_actors" in inspector.get_table_names()