refactor(test): remove redundant cargo build from CLI test setup
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>
This commit is contained in:
parent
c91dd5d78d
commit
8d25353f04
1 changed files with 1 additions and 11 deletions
|
|
@ -18,17 +18,7 @@ struct SharedServer {
|
|||
}
|
||||
|
||||
/// Single shared test server for all CLI tests
|
||||
static TEST_SERVER: Lazy<Mutex<Option<SharedServer>>> = 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<Mutex<Option<SharedServer>>> = Lazy::new(|| Mutex::new(None));
|
||||
|
||||
/// Get path to the brewlog binary
|
||||
pub fn brewlog_bin() -> String {
|
||||
|
|
|
|||
Loading…
Reference in a new issue