V6.2 Add GEDCOM data
Quality Gate / gate (push) Successful in 1m27s

This commit is contained in:
Jim Lancaster
2026-09-03 05:34:13 -05:00
parent e54c2d9f26
commit 7eca9fe7dc
17 changed files with 1155 additions and 16 deletions
+22 -3
View File
@@ -22,11 +22,13 @@ async def test_enqueue_and_list_runs(default_session_factory, default_settings):
first = await service.enqueue_run(job_type=MaintenanceJobType.BACKUP, triggered_by="test")
second = await service.enqueue_run(job_type=MaintenanceJobType.STORAGE_RECONCILIATION, triggered_by="test")
third = await service.enqueue_run(job_type=MaintenanceJobType.GEDCOM_IMPORT, triggered_by="test")
runs = await service.list_runs(limit=10)
assert len(runs) == 2
assert runs[0].id == second.id
assert runs[1].id == first.id
assert len(runs) == 3
assert runs[0].id == third.id
assert runs[1].id == second.id
assert runs[2].id == first.id
assert runs[0].status == MaintenanceRunStatus.QUEUED
@@ -72,3 +74,20 @@ async def test_list_runs_raises_when_table_is_missing(default_session_factory, d
with pytest.raises(MaintenanceError) as exc:
await service.list_runs(limit=10)
assert exc.value.category == ErrorCategory.INFRA_PERSISTENT
@pytest.mark.asyncio
async def test_execute_run_dispatches_gedcom_import(default_session_factory, default_settings, monkeypatch):
service = MaintenanceService(session_factory=default_session_factory, settings=default_settings)
run = await service.enqueue_run(job_type=MaintenanceJobType.GEDCOM_IMPORT, triggered_by="test")
async def _fake_gedcom_import():
return MaintenanceExecution(
status=MaintenanceRunStatus.SUCCEEDED,
summary="GEDCOM imported",
output="ok",
)
monkeypatch.setattr(service, "_execute_gedcom_import", _fake_gedcom_import)
execution = await service._execute_run(run)
assert execution.summary == "GEDCOM imported"