Merge pull request from cakebaker/tests_replace_use_of_run

tests: use `succeeds()` instead of `run()`
This commit is contained in:
Sylvestre Ledru 2025-03-08 10:41:14 +01:00 committed by GitHub
commit 9948a09118
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

@ -26,7 +26,7 @@ fn test_kmsg_json() {
.arg("--kmsg-file")
.arg("kmsg.input")
.arg("--json")
.run()
.succeeds()
.no_stderr()
.stdout_is_templated_fixture("test_kmsg_json.expected", &[("\r\n", "\n")]);
}

@ -130,11 +130,11 @@ mod unix {
let cmd_result = UCommand::new()
.terminal_simulation(true)
.arg(&shell_cmd)
.run();
.succeeds();
let output = cmd_result.code_is(0).no_stderr().stdout_str();
let output = cmd_result.no_stderr().stdout_str();
// /proc/self/stat format has sessiion ID as the 6th space-separated
// /proc/self/stat format has session ID as the 6th space-separated
// item; if we managed to get session leadership, we should see a
// difference there...
let (before, after) = output