Skip to content

Commit

Permalink
Add test_stratis_min_pool_stop_invalid_name
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Gurney <[email protected]>
  • Loading branch information
bgurney-rh committed Apr 8, 2024
1 parent 922b85c commit 7a9e29f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/stratis_min.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,22 @@ fn test_stratis_min_pool_rename() {
test_with_stratisd_min_sim(stratis_min_pool_rename);
}

#[test]
// Test stopping a pool using an invalid name, that will fail with a
// "Uuid error".
fn stratis_min_pool_stop_invalid_name() {
let mut cmd = Command::cargo_bin("stratis-min").unwrap();
cmd.arg("pool").arg("stop").arg("pn");
cmd.assert()
.failure()
.stderr(predicate::str::contains("Uuid error"));
}

#[test]
fn test_stratis_min_pool_stop_invalid_name() {
test_with_stratisd_min_sim(stratis_min_pool_stop_invalid_name);
}

fn stratis_min_report() {
let mut cmd = Command::cargo_bin("stratis-min").unwrap();
cmd.arg("report");
Expand Down

0 comments on commit 7a9e29f

Please sign in to comment.