diff --git a/tests/stratis_min.rs b/tests/stratis_min.rs index d942f5481e..0e1a7a06f2 100644 --- a/tests/stratis_min.rs +++ b/tests/stratis_min.rs @@ -92,6 +92,64 @@ fn test_stratis_min_create_with_clevis_1() { )); } +// Test parsing when creating a pool w/ clevis tang, and a URL. +fn stratis_min_create_with_clevis_url() { + let mut cmd = Command::cargo_bin("stratis-min").unwrap(); + cmd.arg("pool") + .arg("create") + .arg("--clevis") + .arg("tang") + .arg("--tang-url") + .arg("url") + .arg("--trust-url") + .arg("pn") + .arg("/dev/n"); + cmd.assert().success(); +} + +#[test] +fn test_stratis_min_create_with_clevis_url() { + test_with_stratisd_min_sim(stratis_min_create_with_clevis_url); +} + +// Test parsing when creating a pool w/ clevis tang, and a thumbprint. +fn stratis_min_create_with_clevis_thumbprint() { + let mut cmd = Command::cargo_bin("stratis-min").unwrap(); + cmd.arg("pool") + .arg("create") + .arg("--clevis") + .arg("tang") + .arg("--tang-url") + .arg("url") + .arg("--thumbprint") + .arg("jkj") + .arg("pn") + .arg("/dev/n"); + cmd.assert().success(); +} + +#[test] +fn test_stratis_min_create_with_clevis_thumbprint() { + test_with_stratisd_min_sim(stratis_min_create_with_clevis_thumbprint); +} + +// Test parsing when creating a pool w/ clevis TPM2. +fn stratis_min_create_with_clevis_tpm() { + let mut cmd = Command::cargo_bin("stratis-min").unwrap(); + cmd.arg("pool") + .arg("create") + .arg("--clevis") + .arg("tpm2") + .arg("pn") + .arg("/dev/n"); + cmd.assert().success(); +} + +#[test] +fn test_stratis_min_create_with_clevis_tpm() { + test_with_stratisd_min_sim(stratis_min_create_with_clevis_tpm); +} + #[test] // Test parsing when creating a pool with an invalid Clevis method. fn test_stratis_min_create_with_clevis_invalid() {