Fix test compilation errors#44
Fix test compilation errors#44leynos merged 1 commit intocodex/add-rustdoc-comment-for-wait_for_filefrom
Conversation
Reviewer's GuideTests now compile after deriving Clone for Config, replacing external test helpers with inline implementations (EnvVarGuard, temp_config, octocrab_for, wait_for_file), simplifying logging setup, and updating dependencies (removed test-support/test-utils, added wiremock). File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
6010207
into
codex/add-rustdoc-comment-for-wait_for_file
There was a problem hiding this comment.
Hey @leynos - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `crates/comenqd/src/logging.rs:69` </location>
<code_context>
#[test]
fn init_logging() {
let buf = Arc::new(Mutex::new(Vec::new()));
- std::env::set_var("RUST_LOG", "info");
+ unsafe { std::env::set_var("RUST_LOG", "info") };
init_with_writer(BufMakeWriter { buf: buf.clone() });
info!("captured");
</code_context>
<issue_to_address>
Using `unsafe` for `std::env::set_var` may be unnecessary on stable Rust.
If targeting stable Rust, remove the unnecessary `unsafe` block or use a cfg attribute to conditionally include it only when required.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
unsafe { std::env::set_var("RUST_LOG", "info") };
=======
std::env::set_var("RUST_LOG", "info");
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| @@ -66,7 +65,7 @@ mod tests { | |||
| #[test] | |||
| fn init_logging() { | |||
| let buf = Arc::new(Mutex::new(Vec::new())); | |||
There was a problem hiding this comment.
suggestion: Using unsafe for std::env::set_var may be unnecessary on stable Rust.
If targeting stable Rust, remove the unnecessary unsafe block or use a cfg attribute to conditionally include it only when required.
| let buf = Arc::new(Mutex::new(Vec::new())); | |
| std::env::set_var("RUST_LOG", "info"); |
Summary
EnvVarGuardand deriveCloneforConfigwiremockdev dependencyTesting
make fmtmake lintmake testhttps://chatgpt.com/codex/tasks/task_e_688f7c68a0d4832298b45ef1f247e76f
Summary by Sourcery
Fix test compilation errors by deriving Clone for Config, inlining test utilities, simplifying logging setup, and updating dependencies
Enhancements:
Tests:
Chores: