Refactor(testing): extract shared multisig auth test setup helper
- Vorherrschende Sprache
- Rust
- Sterne
- 132
- Forks
- 167
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 110
Beschreibung
> [crates/miden-testing/tests/auth/multisig_smart.rs]
> ```
> (Vec, Vec, Vec, Vec);
>
> /// Sets up secret keys, auth schemes, public keys, and authenticators for a specific scheme.
> fn setup_keys_and_authenticators_with_scheme(
> ```
> Is it not possible to reuse the existing setup_keys_and_authenticators_with_scheme function which we use in the existing mutlisig?
Originally by: @partylikeits1983 in https://github.com/0xMiden/protocol/pull/2806
Extract the helper into a shared module reachable from every auth test:
```
crates/miden-testing/tests/auth/
mod.rs
common.rs # new — pub fn setup_keys_and_authenticators_with_scheme + MultisigTestSetup
multisig.rs
multisig_smart.rs
guarded_multisig.rs
hybrid_multisig.rs
```
Each test file then replaces its local copy with:
`use crate::auth::common::{MultisigTestSetup, setup_keys_and_authenticators_with_scheme};`
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.