0xMiden / 0xMiden/protocol

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

Offen
#2,869 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
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

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.