Skip to content

Table-ify ssh-console cert + escape-sequence tests; cover BmcVendor round-trip #2727

Description

@chet

ssh-console has two hand-rolled test clusters plus an untested string contract. ssh_cert_parsing.rs holds ~14 single-assertion tests over key_id_contains_role / get_user_from_key_id (each (key_id, role/fmt) -> bool / Option<&str>), and bmc/vendor.rs has one fat test_filter_escape_sequence (~15 inline assert_eq! blocks with no per-case labels).

Collapse the cert tests into value_scenarios! tables and the escape-sequence test into a scenarios! table over (input, prev_pending) -> (output, pending_out) so each case is named. Then ADD the missing BmcVendor round-trip coverage: from_config_string / config_string (6 vendors, string<->enum) and its custom serde -- currently zero tests on a contract used in config (de)serialization.

Scope

  • crates/ssh-console/src/ssh_cert_parsing.rs -- collapse the 14 predicate tests.
  • crates/ssh-console/src/bmc/vendor.rs -- table-ify test_filter_escape_sequence; add BmcVendor round-trip + serde tables.

Acceptance

  • Cert/escape coverage preserved; new BmcVendor round-trip table covers all 6 variants + an invalid string.
  • cargo test -p ssh-console green; cargo clippy --all-features + cargo make format-nightly clean.

Size: L

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