fix: replace expect with output status check in tests

This commit is contained in:
Andrew Phillips (aider)
2025-05-12 12:07:43 -03:00
parent b5de04c877
commit 64c92651b3

View File

@@ -57,7 +57,8 @@ mod tests {
let input = "test content"; let input = "test content";
// Create a command that pipes input to keep with the specified environment // Create a command that pipes input to keep with the specified environment
let cmd = format!("echo {} | {}", input, env); let cmd = format!("echo {} | {}", input, env);
run_sh(cmd.as_str()).expect("Failed to execute command"); let output = run_sh(cmd.as_str());
assert!(output.status.success(), "Command failed with status: {}", output.status);
// Verify the item was saved // Verify the item was saved
let output = Command::new("sh") let output = Command::new("sh")
@@ -227,7 +228,8 @@ mod tests {
let input = "test content"; let input = "test content";
// Create a command that pipes input to keep with the specified environment and tags // Create a command that pipes input to keep with the specified environment and tags
let cmd = format!("echo {} | {}", input, env); let cmd = format!("echo {} | {}", input, env);
run_sh(cmd.as_str()).expect("Failed to execute command"); let output = run_sh(cmd.as_str());
assert!(output.status.success(), "Command failed with status: {}", output.status);
// List items with a specific tag // List items with a specific tag
let output = Command::new("sh") let output = Command::new("sh")