secrets has two clusters the table helper tidies. local_credentials/mod.rs holds ~15 one-per-variant snapshot tests, each calling populated_snapshot().get(key) and asserting a value -- identical structure, differing only by CredentialKey and expected output. And credentials.rs's to_key_str_produces_valid_paths already iterates a hand-rolled Vec<(CredentialKey, &str)> loop.
Fold the snapshot tests into one value_scenarios! / check_values table, and convert the existing loop to the helper.
Scope
crates/secrets/src/local_credentials/mod.rs -- the ~15 snapshot tests.
crates/secrets/src/credentials.rs -- to_key_str_produces_valid_paths (and the sibling prefix loop) onto check_values.
Acceptance
- Coverage preserved; no production change.
cargo test -p secrets green; cargo clippy --all-features + cargo make format-nightly clean.
Size: M
Part of #2692.
secretshas two clusters the table helper tidies.local_credentials/mod.rsholds ~15 one-per-variant snapshot tests, each callingpopulated_snapshot().get(key)and asserting a value -- identical structure, differing only byCredentialKeyand expected output. Andcredentials.rs'sto_key_str_produces_valid_pathsalready iterates a hand-rolledVec<(CredentialKey, &str)>loop.Fold the snapshot tests into one
value_scenarios!/check_valuestable, and convert the existing loop to the helper.Scope
crates/secrets/src/local_credentials/mod.rs-- the ~15 snapshot tests.crates/secrets/src/credentials.rs--to_key_str_produces_valid_paths(and the sibling prefix loop) ontocheck_values.Acceptance
cargo test -p secretsgreen;cargo clippy --all-features+cargo make format-nightlyclean.Size: M
Part of #2692.