Skip to content

Commit

Permalink
cli_tests: wait on child process
Browse files Browse the repository at this point in the history
  • Loading branch information
henrytill committed Feb 22, 2025
1 parent 0d5cb87 commit 89ef564
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions host/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ fn test_save() {
let actual = base::read_response(stdout).expect("Failed to read response");

assert_eq!(expected, actual);

let status = child.wait().expect("Failed to wait for child process");
assert!(status.success())
}

#[test]
Expand Down Expand Up @@ -124,6 +127,9 @@ fn test_search() {
let actual = base::read_response(stdout).expect("Failed to read response");

assert_eq!(expected, actual);

let status = child.wait().expect("Failed to wait for child process");
assert!(status.success())
}

#[test]
Expand Down Expand Up @@ -207,6 +213,9 @@ fn test_search_quotation() {
let actual = base::read_response(stdout).expect("Failed to read response");

assert_eq!(expected, actual);

let status = child.wait().expect("Failed to wait for child process");
assert!(status.success())
}

#[test]
Expand Down Expand Up @@ -303,6 +312,9 @@ fn search_idempotent() {
let actual = base::read_response(stdout).expect("Failed to read response");

assert_eq!(expected_site, actual);

let status = child.wait().expect("Failed to wait for child process");
assert!(status.success())
}

#[test]
Expand Down Expand Up @@ -384,4 +396,7 @@ fn test_remove() {
let actual = base::read_response(stdout).expect("Failed to read response");

assert_eq!(expected, actual);

let status = child.wait().expect("Failed to wait for child process");
assert!(status.success())
}

0 comments on commit 89ef564

Please sign in to comment.