From 8d25353f046d6adfd64652d492215edfd19e0b11 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 25 Nov 2025 15:45:03 +0000 Subject: [PATCH] refactor(test): remove redundant cargo build from CLI test setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The project is already built by cargo test before running tests, so the explicit cargo build step in the TEST_SERVER lazy static was redundant and wasteful. All 70 tests pass (8 unit + 46 server + 16 CLI) ✅ Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com> --- tests/cli/helpers.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/cli/helpers.rs b/tests/cli/helpers.rs index 7cfb14e..15e32cf 100644 --- a/tests/cli/helpers.rs +++ b/tests/cli/helpers.rs @@ -18,17 +18,7 @@ struct SharedServer { } /// Single shared test server for all CLI tests -static TEST_SERVER: Lazy>> = Lazy::new(|| { - // Build the binary first - eprintln!("Building brewlog binary..."); - let status = Command::new("cargo") - .args(&["build", "--bin", "brewlog"]) - .status() - .expect("Failed to build brewlog binary"); - assert!(status.success(), "Failed to compile brewlog"); - - Mutex::new(None) -}); +static TEST_SERVER: Lazy>> = Lazy::new(|| Mutex::new(None)); /// Get path to the brewlog binary pub fn brewlog_bin() -> String {