Skip to content

Commit

Permalink
Always capture stderr for tests needing it
Browse files Browse the repository at this point in the history
  • Loading branch information
ayazhafiz committed Sep 27, 2023
1 parent 1bdf0d8 commit c04e1ea
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions crates/abq_cli/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4717,11 +4717,17 @@ fn warn_on_different_runner_command() {
args
};

let instance1 = Abq::new(format!("{name}_inst1")).args(test_args(0)).run();
let instance1 = Abq::new(format!("{name}_inst1"))
.args(test_args(0))
.always_capture_stderr(true)
.run();

assert!(instance1.exit_status.success());

let instance2 = Abq::new(format!("{name}_inst2")).args(test_args(1)).run();
let instance2 = Abq::new(format!("{name}_inst2"))
.args(test_args(1))
.always_capture_stderr(true)
.run();

assert!(instance2.exit_status.success());

Expand Down Expand Up @@ -4818,7 +4824,10 @@ fn write_partial_rwx_v1_json_results_on_early_runner_termination() {
stdout,
stderr,
exit_status,
} = Abq::new(format!("{name}_worker0")).args(test_args).run();
} = Abq::new(format!("{name}_worker0"))
.args(test_args)
.always_capture_stderr(true)
.run();

assert!(!exit_status.success());
assert_eq!(exit_status.code(), Some(ExitCode::ABQ_ERROR.get()));
Expand Down

0 comments on commit c04e1ea

Please sign in to comment.