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 <oz-agent@warp.dev>
This commit is contained in:
Jacob Schmidt 2026-03-02 20:39:02 -06:00
parent 75852eac83
commit ab2c126ea2
2 changed files with 6 additions and 2 deletions

View File

@ -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;
}

View File

@ -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);
}