0xMiden / 0xMiden/protocol

Refactor(testing): extract shared multisig auth test setup helper

Aperta
#2,869 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
132
Fork
167
Merge medio
1g 23h
PR unite (30g)
110

Descrizione

> [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};`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.