Skip to content

Commit

Permalink
Merge pull request #3644 from bgurney-rh/stratis-min-tests-bogusunlock
Browse files Browse the repository at this point in the history
Add test_stratis_min_pool_start_invalid_unlock_method()
  • Loading branch information
mulkieran authored Jul 6, 2024
2 parents 6114dd4 + 994ddae commit 4dda0c3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/stratis_min.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,23 @@ fn test_stratis_min_pool_start_invalid_uuid() {
.stderr(predicate::str::contains("Uuid error"));
}

#[test]
// Test starting a pool using an invalid unlock method.
fn test_stratis_min_pool_start_invalid_unlock_method() {
let mut cmd = Command::cargo_bin("stratis-min").unwrap();
cmd.arg("pool")
.arg("start")
.arg("--name")
.arg("pn")
.arg("--unlock-method=bogus");
cmd.assert()
.failure()
.code(1)
.stderr(predicate::str::contains(
"bogus is an invalid unlock method",
));
}

#[test]
// Test binding a pool using an invalid UUID; unless name is specified the
// id value is interpreted as a UUID.
Expand Down

0 comments on commit 4dda0c3

Please sign in to comment.