Skip to content

Commit

Permalink
chore: output curl version in server test failure.
Browse files Browse the repository at this point in the history
In the event the `server()` integration test fails it's helpful to know
the version of `curl` that was used. This commit includes this
information when the `curl` client invocation returns a non-zero status
code.
  • Loading branch information
cpu authored and djc committed Mar 8, 2023
1 parent c4dd4ca commit aa1506a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ fn server() {
srv.kill().unwrap();

if !output.status.success() {
let version_stdout = Command::new("curl")
.arg("--version")
.output()
.expect("cannot run curl to collect --version")
.stdout;
println!("curl version: {}", String::from_utf8_lossy(&version_stdout));
println!("curl stderr:\n{}", String::from_utf8_lossy(&output.stderr));
}

Expand Down

0 comments on commit aa1506a

Please sign in to comment.