test: add unit tests to boost coverage to 95%#325
Merged
Conversation
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>
|
PR too large: 1148 lines added (limit: 750, excludes Cargo files, tests, docs, examples, and benchmarks). Please split into smaller PRs. Add |
2 tasks
aslakknutsen
reviewed
Jul 9, 2026
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>
aslakknutsen
approved these changes
Jul 10, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Files changed
apis/src/anthropic/to_openai/{request,response,mod}.rs— conversion error paths, tool_choice branches, metadata extractionapis/src/openai/sse/{frame,responses/event}.rs— SseParseError Display, event_type round-tripapis/src/openai/conversations/{handlers,filter}.rs— store_error_response, parse_item_list_params, reject_store_unavailableapis/src/openai/responses/proxy/tests.rs— strip_conversation_field edge casesapis/src/store/tests.rs— StoreError Display + Error traitfilters/src/inference/model_to_header.rs— response-side delegate methodsfilters/src/guardrails/tests.rs— add missing assert messagesserver/src/commands.rs— default_config_sourceTest plan
cargo test --workspace --lib— 2035 tests passmake lint— clippy + nightly rustfmt cleancargo llvm-cov— coverage at 95.35%