diff --git a/openmls/src/framing/test_framing.rs b/openmls/src/framing/test_framing.rs index 9c7d3faccc..4bad37dda9 100644 --- a/openmls/src/framing/test_framing.rs +++ b/openmls/src/framing/test_framing.rs @@ -8,6 +8,7 @@ use openmls_rust_crypto::OpenMlsRustCrypto; use signable::Verifiable; use tls_codec::{Deserialize, Serialize}; +use crate::test_utils::*; use crate::{ binary_tree::{array_representation::TreeSize, LeafNodeIndex}, ciphersuite::signable::{Signable, SignatureError}, diff --git a/openmls/src/group/public_group/tests.rs b/openmls/src/group/public_group/tests.rs index 630edfba8f..f12d479fe1 100644 --- a/openmls/src/group/public_group/tests.rs +++ b/openmls/src/group/public_group/tests.rs @@ -17,6 +17,7 @@ use crate::{ }; use super::PublicGroup; +use crate::test_utils::*; #[apply(ciphersuites_and_backends)] async fn public_group(ciphersuite: Ciphersuite, backend: &impl OpenMlsCryptoProvider) { diff --git a/openmls/src/group/tests/external_add_proposal.rs b/openmls/src/group/tests/external_add_proposal.rs index 6618a2db3f..e81835f3d5 100644 --- a/openmls/src/group/tests/external_add_proposal.rs +++ b/openmls/src/group/tests/external_add_proposal.rs @@ -16,6 +16,7 @@ use crate::{ use openmls_traits::types::Ciphersuite; use super::utils::*; +use crate::test_utils::*; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/group/tests/external_remove_proposal.rs b/openmls/src/group/tests/external_remove_proposal.rs index 8c7b19a7d8..0887a961eb 100644 --- a/openmls/src/group/tests/external_remove_proposal.rs +++ b/openmls/src/group/tests/external_remove_proposal.rs @@ -11,6 +11,7 @@ use crate::{ use openmls_traits::types::Ciphersuite; use super::utils::*; +use crate::test_utils::*; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/group/tests/test_commit_validation.rs b/openmls/src/group/tests/test_commit_validation.rs index aa9ddfd052..5aa4d0e78a 100644 --- a/openmls/src/group/tests/test_commit_validation.rs +++ b/openmls/src/group/tests/test_commit_validation.rs @@ -10,6 +10,7 @@ use tls_codec::{Deserialize, Serialize}; use super::utils::{ generate_credential_with_key, generate_key_package, resign_message, CredentialWithKeyAndSigner, }; +use crate::test_utils::*; use crate::{ binary_tree::LeafNodeIndex, ciphersuite::signable::Signable, diff --git a/openmls/src/group/tests/test_encoding.rs b/openmls/src/group/tests/test_encoding.rs index 0286b4dd5d..b09455aaab 100644 --- a/openmls/src/group/tests/test_encoding.rs +++ b/openmls/src/group/tests/test_encoding.rs @@ -7,7 +7,7 @@ use tls_codec::{Deserialize, Serialize}; use super::utils::*; use crate::{ binary_tree::LeafNodeIndex, framing::*, group::*, key_packages::*, messages::*, - schedule::psk::store::ResumptionPskStore, test_utils::*, *, + schedule::psk::store::ResumptionPskStore, test_utils::*, }; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/group/tests/test_external_commit_validation.rs b/openmls/src/group/tests/test_external_commit_validation.rs index b0dbf13669..081cb13afe 100644 --- a/openmls/src/group/tests/test_external_commit_validation.rs +++ b/openmls/src/group/tests/test_external_commit_validation.rs @@ -9,6 +9,7 @@ use rstest_reuse::apply; use tls_codec::{Deserialize, Serialize}; use self::utils::*; +use crate::test_utils::*; use crate::{ ciphersuite::{hash_ref::ProposalRef, signable::Verifiable}, framing::{ diff --git a/openmls/src/group/tests/test_framing.rs b/openmls/src/group/tests/test_framing.rs index 15e5daa0e8..aaa42ad9d0 100644 --- a/openmls/src/group/tests/test_framing.rs +++ b/openmls/src/group/tests/test_framing.rs @@ -22,7 +22,6 @@ use crate::{ sender_ratchet::SenderRatchetConfiguration, }, versions::ProtocolVersion, - *, }; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/group/tests/test_framing_validation.rs b/openmls/src/group/tests/test_framing_validation.rs index 83c7f10e3d..556c5c5f22 100644 --- a/openmls/src/group/tests/test_framing_validation.rs +++ b/openmls/src/group/tests/test_framing_validation.rs @@ -18,6 +18,7 @@ use crate::{ use super::utils::{ generate_credential_with_key, generate_key_package, CredentialWithKeyAndSigner, }; +use crate::test_utils::*; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/group/tests/test_past_secrets.rs b/openmls/src/group/tests/test_past_secrets.rs index 0943e73c4c..7d28cb37b9 100644 --- a/openmls/src/group/tests/test_past_secrets.rs +++ b/openmls/src/group/tests/test_past_secrets.rs @@ -3,8 +3,7 @@ use openmls_rust_crypto::OpenMlsRustCrypto; use openmls_traits::{types::Ciphersuite, OpenMlsCryptoProvider}; -use rstest::*; -use rstest_reuse::{self, *}; +use crate::test_utils::*; use super::utils::{generate_credential_with_key, generate_key_package}; use crate::{ diff --git a/openmls/src/group/tests/test_proposal_validation.rs b/openmls/src/group/tests/test_proposal_validation.rs index 5084f3d855..b2cff815d4 100644 --- a/openmls/src/group/tests/test_proposal_validation.rs +++ b/openmls/src/group/tests/test_proposal_validation.rs @@ -13,6 +13,7 @@ use tls_codec::{Deserialize, Serialize}; use super::utils::{ generate_credential_with_key, generate_key_package, resign_message, CredentialWithKeyAndSigner, }; +use crate::test_utils::*; use crate::{ binary_tree::LeafNodeIndex, ciphersuite::hash_ref::ProposalRef, diff --git a/openmls/src/group/tests/test_remove_operation.rs b/openmls/src/group/tests/test_remove_operation.rs index effd5011c2..12e86c9f54 100644 --- a/openmls/src/group/tests/test_remove_operation.rs +++ b/openmls/src/group/tests/test_remove_operation.rs @@ -5,7 +5,6 @@ use crate::{ framing::*, group::{config::CryptoConfig, *}, test_utils::*, - *, }; use openmls_rust_crypto::OpenMlsRustCrypto; diff --git a/openmls/src/group/tests/test_wire_format_policy.rs b/openmls/src/group/tests/test_wire_format_policy.rs index 586276001a..dd1d2f1713 100644 --- a/openmls/src/group/tests/test_wire_format_policy.rs +++ b/openmls/src/group/tests/test_wire_format_policy.rs @@ -6,6 +6,7 @@ use openmls_traits::{signatures::Signer, types::Ciphersuite, OpenMlsCryptoProvid use rstest::*; use rstest_reuse::{self, *}; +use crate::test_utils::*; use crate::{ framing::*, group::{config::CryptoConfig, errors::*, *}, diff --git a/openmls/src/group/tests/utils.rs b/openmls/src/group/tests/utils.rs index 3baee12765..1eed19a6a7 100644 --- a/openmls/src/group/tests/utils.rs +++ b/openmls/src/group/tests/utils.rs @@ -19,7 +19,7 @@ use tls_codec::Serialize; use crate::{ ciphersuite::signable::Signable, credentials::*, framing::*, group::*, key_packages::*, messages::ConfirmationTag, schedule::psk::store::ResumptionPskStore, test_utils::*, - versions::ProtocolVersion, *, + versions::ProtocolVersion, }; /// Configuration of a client meant to be used in a test setup. diff --git a/openmls/src/messages/tests/test_codec.rs b/openmls/src/messages/tests/test_codec.rs index 6b4a87408b..a8c4f1f238 100644 --- a/openmls/src/messages/tests/test_codec.rs +++ b/openmls/src/messages/tests/test_codec.rs @@ -1,13 +1,12 @@ -use openmls_rust_crypto::OpenMlsRustCrypto; -use tls_codec::{Deserialize, Serialize}; - +use crate::test_utils::*; use crate::{ extensions::Extensions, group::GroupId, messages::{PreSharedKeyProposal, ProtocolVersion, ReInitProposal}, schedule::psk::{ExternalPsk, PreSharedKeyId, Psk, ResumptionPsk, ResumptionPskUsage}, - test_utils::*, }; +use openmls_rust_crypto::OpenMlsRustCrypto; +use tls_codec::{Deserialize, Serialize}; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/messages/tests/test_export_group_info.rs b/openmls/src/messages/tests/test_export_group_info.rs index e14c14c5e1..3e2fdc7759 100644 --- a/openmls/src/messages/tests/test_export_group_info.rs +++ b/openmls/src/messages/tests/test_export_group_info.rs @@ -1,14 +1,10 @@ -use tls_codec::{Deserialize, Serialize}; - +use crate::test_utils::*; use crate::{ ciphersuite::signable::Verifiable, group::test_core_group::setup_alice_group, - messages::{ - group_info::{GroupInfo, VerifiableGroupInfo}, - *, - }, - test_utils::*, + messages::group_info::{GroupInfo, VerifiableGroupInfo}, }; +use tls_codec::{Deserialize, Serialize}; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/messages/tests/test_proposals.rs b/openmls/src/messages/tests/test_proposals.rs index 3f8ca0e160..d4fcae11d3 100644 --- a/openmls/src/messages/tests/test_proposals.rs +++ b/openmls/src/messages/tests/test_proposals.rs @@ -1,6 +1,4 @@ -use openmls_rust_crypto::OpenMlsRustCrypto; -use tls_codec::{Deserialize, Serialize}; - +use crate::test_utils::*; use crate::{ binary_tree::LeafNodeIndex, ciphersuite::hash_ref::ProposalRef, @@ -8,8 +6,9 @@ use crate::{ proposals::{Proposal, ProposalOrRef, RemoveProposal}, proposals_in::ProposalOrRefIn, }, - test_utils::*, }; +use openmls_rust_crypto::OpenMlsRustCrypto; +use tls_codec::{Deserialize, Serialize}; wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); diff --git a/openmls/src/messages/tests/test_welcome.rs b/openmls/src/messages/tests/test_welcome.rs index 53aae69003..f8ded54ae2 100644 --- a/openmls/src/messages/tests/test_welcome.rs +++ b/openmls/src/messages/tests/test_welcome.rs @@ -1,10 +1,9 @@ +use crate::test_utils::*; use openmls_basic_credential::SignatureKeyPair; use openmls_rust_crypto::OpenMlsRustCrypto; use openmls_traits::{ crypto::OpenMlsCrypto, key_store::OpenMlsKeyStore, types::Ciphersuite, OpenMlsCryptoProvider, }; -use rstest::*; -use rstest_reuse::{self, *}; use tls_codec::{Deserialize, Serialize}; use crate::{ diff --git a/openmls/src/treesync/mod.rs b/openmls/src/treesync/mod.rs index 0cd5b34e80..9911d7c63d 100644 --- a/openmls/src/treesync/mod.rs +++ b/openmls/src/treesync/mod.rs @@ -719,6 +719,7 @@ impl TreeSync { #[cfg(test)] mod test { use super::*; + use crate::test_utils::*; #[cfg(debug_assertions)] #[test] diff --git a/openmls/src/treesync/tests_and_kats/tests/test_diff.rs b/openmls/src/treesync/tests_and_kats/tests/test_diff.rs index 1058a1245e..8d58d0881b 100644 --- a/openmls/src/treesync/tests_and_kats/tests/test_diff.rs +++ b/openmls/src/treesync/tests_and_kats/tests/test_diff.rs @@ -3,6 +3,7 @@ use openmls_traits::{types::Ciphersuite, OpenMlsCryptoProvider}; use rstest::*; use rstest_reuse::apply; +use crate::test_utils::*; use crate::{ credentials::test_utils::new_credential, key_packages::KeyPackageBundle, diff --git a/openmls/tests/book_code.rs b/openmls/tests/book_code.rs index 6d05f622c6..a0cb7d05be 100644 --- a/openmls/tests/book_code.rs +++ b/openmls/tests/book_code.rs @@ -1,7 +1,6 @@ use openmls::{ prelude::{config::CryptoConfig, *}, test_utils::*, - *, }; use openmls_basic_credential::SignatureKeyPair; use openmls_rust_crypto::OpenMlsRustCrypto; diff --git a/openmls/tests/key_store.rs b/openmls/tests/key_store.rs index 522f327a81..3bb333e5f3 100644 --- a/openmls/tests/key_store.rs +++ b/openmls/tests/key_store.rs @@ -1,5 +1,5 @@ //! A couple of simple tests on how to interact with the key store. -use openmls::{prelude::*, test_utils::*, *}; +use openmls::{prelude::*, test_utils::*}; use openmls_basic_credential::SignatureKeyPair; #[apply(ciphersuites_and_backends)] diff --git a/openmls/tests/test_decryption_key_index.rs b/openmls/tests/test_decryption_key_index.rs index b79b301acb..aec51ff585 100644 --- a/openmls/tests/test_decryption_key_index.rs +++ b/openmls/tests/test_decryption_key_index.rs @@ -5,7 +5,6 @@ use openmls::{ test_framework::{ActionType, CodecUse, MlsGroupTestSetup}, *, }, - *, }; #[apply(ciphersuites)] diff --git a/openmls/tests/test_external_commit.rs b/openmls/tests/test_external_commit.rs index 25ac28369c..c390b14c8a 100644 --- a/openmls/tests/test_external_commit.rs +++ b/openmls/tests/test_external_commit.rs @@ -1,6 +1,6 @@ use openmls::{ credentials::test_utils::new_credential, messages::group_info::VerifiableGroupInfo, prelude::*, - test_utils::*, *, + test_utils::*, }; use openmls_basic_credential::SignatureKeyPair; diff --git a/openmls/tests/test_interop_scenarios.rs b/openmls/tests/test_interop_scenarios.rs index 243b9bf5ac..d4d44d685e 100644 --- a/openmls/tests/test_interop_scenarios.rs +++ b/openmls/tests/test_interop_scenarios.rs @@ -2,7 +2,6 @@ use openmls::{ prelude::*, test_utils::test_framework::{ActionType, CodecUse, MlsGroupTestSetup}, test_utils::*, - *, }; // The following tests correspond to the interop test scenarios detailed here: diff --git a/openmls/tests/test_managed_api.rs b/openmls/tests/test_managed_api.rs index 97a0a074c1..c1d5f25509 100644 --- a/openmls/tests/test_managed_api.rs +++ b/openmls/tests/test_managed_api.rs @@ -2,7 +2,6 @@ use openmls::{ prelude::*, test_utils::test_framework::{ActionType, CodecUse, MlsGroupTestSetup}, test_utils::*, - *, }; #[apply(ciphersuites)] diff --git a/openmls/tests/test_mls_group.rs b/openmls/tests/test_mls_group.rs index ad78b3c3c2..06768f0aee 100644 --- a/openmls/tests/test_mls_group.rs +++ b/openmls/tests/test_mls_group.rs @@ -1,7 +1,6 @@ use openmls::{ prelude::{config::CryptoConfig, test_utils::new_credential, *}, test_utils::*, - *, }; use openmls_traits::{key_store::OpenMlsKeyStore, signatures::Signer, OpenMlsCryptoProvider};