Skip to content

test: add unit tests to boost coverage to 95%#325

Merged
aslakknutsen merged 2 commits into
praxis-proxy:mainfrom
leseb:leseb/watch-pr-323-cron
Jul 10, 2026
Merged

test: add unit tests to boost coverage to 95%#325
aslakknutsen merged 2 commits into
praxis-proxy:mainfrom
leseb:leseb/watch-pr-323-cron

Conversation

@leseb

@leseb leseb commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add unit tests across 12 files to increase line coverage from ~94.5% to 95.35%
  • Cover previously untested code paths: error handling, edge cases, Display impls, pure helper functions
  • Fix missing assert messages in guardrails tests (from test(guardrails): add unit tests for config validation #323 review feedback)

Files changed

  • apis/src/anthropic/to_openai/{request,response,mod}.rs — conversion error paths, tool_choice branches, metadata extraction
  • apis/src/openai/sse/{frame,responses/event}.rs — SseParseError Display, event_type round-trip
  • apis/src/openai/conversations/{handlers,filter}.rs — store_error_response, parse_item_list_params, reject_store_unavailable
  • apis/src/openai/responses/proxy/tests.rs — strip_conversation_field edge cases
  • apis/src/store/tests.rs — StoreError Display + Error trait
  • filters/src/inference/model_to_header.rs — response-side delegate methods
  • filters/src/guardrails/tests.rs — add missing assert messages
  • server/src/commands.rs — default_config_source

Test plan

  • cargo test --workspace --lib — 2035 tests pass
  • make lint — clippy + nightly rustfmt clean
  • cargo llvm-cov — coverage at 95.35%

Add unit tests across 12 files to increase line coverage from ~94.5%
to 95.35%, covering previously untested code paths: error handling,
edge cases, Display impls, and pure helper functions.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb leseb requested review from a team and crstrn13 July 9, 2026 19:03
@praxis-bot-app

praxis-bot-app Bot commented Jul 9, 2026

Copy link
Copy Markdown

PR too large: 1148 lines added (limit: 750, excludes Cargo files, tests, docs, examples, and benchmarks). Please split into smaller PRs. Add skip/pr-conventions label to override.

Comment thread server/src/commands.rs Outdated
Addresses review feedback: replace raw set_current_dir with the
CwdGuard pattern from watcher.rs to prevent cwd leaks on panic
and eliminate race windows with parallel tests.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb leseb requested a review from aslakknutsen July 10, 2026 07:25
@aslakknutsen aslakknutsen added this pull request to the merge queue Jul 10, 2026
Merged via the queue into praxis-proxy:main with commit 4ada038 Jul 10, 2026
17 checks passed
@leseb leseb deleted the leseb/watch-pr-323-cron branch July 10, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants