Skip to content

Table-ify secrets' local-credentials snapshot tests #2726

Description

@chet

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions