Skip to content

test(store): add unit tests for SQLite backend and storage traits#237

Open
leseb wants to merge 2 commits into
praxis-proxy:mainfrom
leseb:leseb/fix-issue-232
Open

test(store): add unit tests for SQLite backend and storage traits#237
leseb wants to merge 2 commits into
praxis-proxy:mainfrom
leseb:leseb/fix-issue-232

Conversation

@leseb

@leseb leseb commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add 8 unit tests for is_memory_database_url in sqlite.rs covering all URL pattern branches (short form, slash form, query params, file-based, whitespace trimming)
  • Add 10 integration tests for previously untested SQLite store methods: get_existing_conversation_item_ids, delete_conversation_item, conversation_item_position, and update_conversation_messages edge cases including tenant isolation

Test plan

  • All new tests pass (cargo test -p praxis-ai-apis store::)
  • Clippy clean (cargo clippy -p praxis-ai-apis -- -D warnings)
  • No existing tests broken (219 total passed, 25 PG tests ignored as expected)

Closes #232

Closes praxis-proxy#232

Signed-off-by: Sébastien Han <seb@redhat.com>
Move the #[cfg(test)] module after all production items to fix
clippy::items_after_test_module, and add failure messages to every
assert! call to match the surrounding test style.

Signed-off-by: Sébastien Han <seb@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add unit tests for storage backends (SQLite, traits)

1 participant