From c1932e22e55b435618701e9d953ec85235113892 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Mon, 1 Jun 2026 18:03:09 +0300 Subject: [PATCH] Strengthen config-load assertions --- haiku_rag_slim/haiku/rag/ingester/queue/migrations.py | 2 ++ tests/ingester/test_cli.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/haiku_rag_slim/haiku/rag/ingester/queue/migrations.py b/haiku_rag_slim/haiku/rag/ingester/queue/migrations.py index ea37d49a..239f4d28 100644 --- a/haiku_rag_slim/haiku/rag/ingester/queue/migrations.py +++ b/haiku_rag_slim/haiku/rag/ingester/queue/migrations.py @@ -37,6 +37,8 @@ async def apply_migrations(conn: aiosqlite.Connection) -> int: else: current = row[0] if current < SCHEMA_VERSION: # pragma: no cover - no migrations yet + # No diff migrations exist yet — future versions add UPDATE/ALTER + # statements between here and the version bump. await _exec(conn, "UPDATE schema_version SET version = ?", SCHEMA_VERSION) await conn.commit() diff --git a/tests/ingester/test_cli.py b/tests/ingester/test_cli.py index b9a5c8c2..519032de 100644 --- a/tests/ingester/test_cli.py +++ b/tests/ingester/test_cli.py @@ -121,16 +121,16 @@ def test_load_config_with_explicit_path(tmp_path): config_file.write_text("embeddings:\n model:\n provider: ollama\n") config = _load_config_with_override(config_file) - assert config is not None + assert config.embeddings.model.provider == "ollama" def test_load_config_falls_back_to_default(monkeypatch): - from haiku.rag.ingester.cli import _load_config_with_override + from haiku.rag.ingester.cli import _load_config_with_override, get_config monkeypatch.setattr("haiku.rag.ingester.cli.find_config_file", lambda _: None) config = _load_config_with_override(None) - assert config is not None + assert config == get_config() # --- cli() entry point ---