From ab2c126ea22b39013ba3fae3efcef1e85b38c233 Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Mon, 2 Mar 2026 20:39:02 -0600 Subject: [PATCH] Unify smoke tests on SqliteFragmentRepository, fix AiProvider default assertion - Switch NewService() from InMemoryFragmentRepository to SqliteFragmentRepository - Fix TestConfigServiceParityKeysAsync: AiProvider default is now llamasharp Co-Authored-By: Oz --- Journal.SmokeTests/Program.DatabaseConfigTests.cs | 2 +- Journal.SmokeTests/Program.Shared.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Journal.SmokeTests/Program.DatabaseConfigTests.cs b/Journal.SmokeTests/Program.DatabaseConfigTests.cs index 9dfeb32..0c260e8 100644 --- a/Journal.SmokeTests/Program.DatabaseConfigTests.cs +++ b/Journal.SmokeTests/Program.DatabaseConfigTests.cs @@ -119,7 +119,7 @@ internal static partial class Program Assert(current.EmbeddingApiUrl == "http://127.0.0.1:8086/v1/embeddings", "Config EmbeddingApiUrl default mismatch."); Assert(current.SpeechRecognitionEngine == "whisper", "Config SpeechRecognitionEngine default mismatch."); Assert(current.WhisperModelSize == "base", "Config WhisperModelSize default mismatch."); - Assert(current.AiProvider == "none", "Config AiProvider default mismatch."); + Assert(current.AiProvider == "llamasharp", "Config AiProvider default mismatch."); return Task.CompletedTask; } diff --git a/Journal.SmokeTests/Program.Shared.cs b/Journal.SmokeTests/Program.Shared.cs index ed1a5cb..25c8902 100644 --- a/Journal.SmokeTests/Program.Shared.cs +++ b/Journal.SmokeTests/Program.Shared.cs @@ -2,7 +2,11 @@ internal static partial class Program { static FragmentService NewService() { - IFragmentRepository repo = new InMemoryFragmentRepository(); + var config = NewConfigService(); + var dbService = new JournalDatabaseService(config); + var session = new DatabaseSessionService(dbService); + session.SetPassword("smoke-test-password"); + var repo = new SqliteFragmentRepository(session); return new FragmentService(repo); }