From bf056997a9d10779316215b18e5bd4906f3f4eca Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Thu, 22 Aug 2024 11:30:26 +0200 Subject: [PATCH] Rename integration tests to match the subcommand being tested. - Rename the files and the tests to reflect the subcommands actually being tested. --- tests/integration.rs | 14 +++++++------- .../{sq_export.rs => sq_cert_export.rs} | 2 +- .../{sq_import.rs => sq_cert_import.rs} | 2 +- .../{sq_certify.rs => sq_pki_certify.rs} | 10 +++++----- tests/integration/{sq_link.rs => sq_pki_link.rs} | 6 +++--- ...ket_decrypt.rs => sq_toolbox_packet_decrypt.rs} | 2 +- ...sq_packet_dump.rs => sq_toolbox_packet_dump.rs} | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) rename tests/integration/{sq_export.rs => sq_cert_export.rs} (99%) rename tests/integration/{sq_import.rs => sq_cert_import.rs} (99%) rename tests/integration/{sq_certify.rs => sq_pki_certify.rs} (98%) rename tests/integration/{sq_link.rs => sq_pki_link.rs} (99%) rename tests/integration/{sq_packet_decrypt.rs => sq_toolbox_packet_decrypt.rs} (98%) rename tests/integration/{sq_packet_dump.rs => sq_toolbox_packet_dump.rs} (99%) diff --git a/tests/integration.rs b/tests/integration.rs index bccba77e..83ca62e8 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -1,12 +1,11 @@ mod integration { mod common; mod sq_autocrypt; + mod sq_cert_export; + mod sq_cert_import; mod sq_cert_lint; - mod sq_certify; mod sq_decrypt; mod sq_encrypt; - mod sq_export; - mod sq_import; mod sq_key_adopt; mod sq_key_approvals_update; mod sq_key_delete; @@ -15,14 +14,15 @@ mod integration { mod sq_key_import_export; mod sq_key_password; mod sq_key_revoke; + mod sq_key_subkey; mod sq_key_subkey_delete; mod sq_key_subkey_expire; mod sq_key_subkey_password; - mod sq_key_subkey; mod sq_key_userid; - mod sq_link; - mod sq_packet_decrypt; - mod sq_packet_dump; mod sq_pki; + mod sq_pki_certify; + mod sq_pki_link; mod sq_sign; + mod sq_toolbox_packet_decrypt; + mod sq_toolbox_packet_dump; } diff --git a/tests/integration/sq_export.rs b/tests/integration/sq_cert_export.rs similarity index 99% rename from tests/integration/sq_export.rs rename to tests/integration/sq_cert_export.rs index 8d60b5d9..4d6a8c3c 100644 --- a/tests/integration/sq_export.rs +++ b/tests/integration/sq_cert_export.rs @@ -11,7 +11,7 @@ use openpgp::cert::prelude::*; use openpgp::parse::Parse; #[test] -fn sq_export() -> Result<()> +fn sq_cert_export() -> Result<()> { let dir = TempDir::new()?; diff --git a/tests/integration/sq_import.rs b/tests/integration/sq_cert_import.rs similarity index 99% rename from tests/integration/sq_import.rs rename to tests/integration/sq_cert_import.rs index 9b51b16b..00c85f53 100644 --- a/tests/integration/sq_import.rs +++ b/tests/integration/sq_cert_import.rs @@ -7,7 +7,7 @@ use openpgp::cert::prelude::*; use openpgp::parse::Parse; #[test] -fn sq_import() -> Result<()> +fn sq_cert_import() -> Result<()> { let dir = TempDir::new()?; diff --git a/tests/integration/sq_certify.rs b/tests/integration/sq_pki_certify.rs similarity index 98% rename from tests/integration/sq_certify.rs rename to tests/integration/sq_pki_certify.rs index 7bb51755..a79878a7 100644 --- a/tests/integration/sq_certify.rs +++ b/tests/integration/sq_pki_certify.rs @@ -20,7 +20,7 @@ use super::common::Sq; const P: &StandardPolicy = &StandardPolicy::new(); #[test] -fn sq_certify() -> Result<()> { +fn sq_pki_certify() -> Result<()> { let mut sq = Sq::new(); let (alice, alice_pgp, _alice_rev) @@ -255,7 +255,7 @@ fn sq_certify() -> Result<()> { } #[test] -fn sq_certify_creation_time() -> Result<()> +fn sq_pki_certify_creation_time() -> Result<()> { // $ date +'%Y%m%dT%H%M%S%z'; date +'%s' let t = 1642692756; @@ -320,7 +320,7 @@ fn sq_certify_creation_time() -> Result<()> } #[test] -fn sq_certify_with_expired_key() -> Result<()> +fn sq_pki_certify_with_expired_key() -> Result<()> { let seconds_in_day = 24 * 60 * 60; @@ -398,7 +398,7 @@ fn sq_certify_with_expired_key() -> Result<()> } #[test] -fn sq_certify_with_revoked_key() -> Result<()> +fn sq_pki_certify_with_revoked_key() -> Result<()> { let seconds_in_day = 24 * 60 * 60; @@ -494,7 +494,7 @@ fn sq_certify_with_revoked_key() -> Result<()> // Certify a certificate in the cert store. #[test] -fn sq_certify_using_cert_store() -> Result<()> +fn sq_pki_certify_using_cert_store() -> Result<()> { let mut sq = Sq::new(); diff --git a/tests/integration/sq_link.rs b/tests/integration/sq_pki_link.rs similarity index 99% rename from tests/integration/sq_link.rs rename to tests/integration/sq_pki_link.rs index d16002af..eabc9015 100644 --- a/tests/integration/sq_link.rs +++ b/tests/integration/sq_pki_link.rs @@ -218,7 +218,7 @@ fn sq_certify(cert_store: &str, // Verify signatures using the acceptance machinery. #[test] -fn sq_link_add_retract() -> Result<()> { +fn sq_pki_link_add_retract() -> Result<()> { let dir = TempDir::new()?; let certd = dir.path().join("cert.d").display().to_string(); @@ -481,7 +481,7 @@ fn sq_link_add_retract() -> Result<()> { // make sure no certifications are written; when they are different // make sure the file changed. #[test] -fn sq_link_update_detection() -> Result<()> { +fn sq_pki_link_update_detection() -> Result<()> { let dir = TempDir::new()?; let certd = dir.path().join("cert.d").display().to_string(); @@ -606,7 +606,7 @@ fn sq_link_update_detection() -> Result<()> { // Check that sq pki link add --temporary works. #[test] -fn sq_link_add_temporary() -> Result<()> { +fn sq_pki_link_add_temporary() -> Result<()> { let dir = TempDir::new()?; let certd = dir.path().join("cert.d").display().to_string(); diff --git a/tests/integration/sq_packet_decrypt.rs b/tests/integration/sq_toolbox_packet_decrypt.rs similarity index 98% rename from tests/integration/sq_packet_decrypt.rs rename to tests/integration/sq_toolbox_packet_decrypt.rs index 13a78f2e..117375ff 100644 --- a/tests/integration/sq_packet_decrypt.rs +++ b/tests/integration/sq_toolbox_packet_decrypt.rs @@ -1,5 +1,5 @@ #[cfg(test)] -mod sq_packet_decrypt { +mod sq_toolbox_packet_decrypt { use assert_cmd::Command; use predicates::prelude::*; diff --git a/tests/integration/sq_packet_dump.rs b/tests/integration/sq_toolbox_packet_dump.rs similarity index 99% rename from tests/integration/sq_packet_dump.rs rename to tests/integration/sq_toolbox_packet_dump.rs index 5a4e954a..69dcd94f 100644 --- a/tests/integration/sq_packet_dump.rs +++ b/tests/integration/sq_toolbox_packet_dump.rs @@ -1,5 +1,5 @@ #[cfg(test)] -mod sq_packet_dump { +mod sq_toolbox_packet_dump { use assert_cmd::Command; use predicates::prelude::*;