Skip to content

Commit aa1506a

Browse files
cpudjc
authored andcommitted
chore: output curl version in server test failure.
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.
1 parent c4dd4ca commit aa1506a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/tests.rs

+6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ fn server() {
6262
srv.kill().unwrap();
6363

6464
if !output.status.success() {
65+
let version_stdout = Command::new("curl")
66+
.arg("--version")
67+
.output()
68+
.expect("cannot run curl to collect --version")
69+
.stdout;
70+
println!("curl version: {}", String::from_utf8_lossy(&version_stdout));
6571
println!("curl stderr:\n{}", String::from_utf8_lossy(&output.stderr));
6672
}
6773

0 commit comments

Comments
 (0)