The agent crate doesn't use the table helper at all, yet it's full of per-case parser/predicate clusters -- the largest single adoption target in Wave 2. This adopts carbide-test-support across its parser tests and closes a few coverage gaps the per-case style left open.
Scope
Adopt the helper (collapse per-case clusters):
health/bgp.rs -- the 8 verify_bgp_summary tests (each rebuilds the same scaffold) -> one check_cases table keyed on a named struct ({ json, host_routes, route_servers, expected_alerts }).
nvue.rs -- split_prefixes_by_family (7 near-identical) -> value_scenarios!.
command_line.rs -- AgentPlatformType / HbnConfigMode from_str + the for value in [...] loop -> tables.
health.rs -- parse_status / parse_disk_utilization / parse_mlxprivhost -> tables.
Add coverage (table-shaped, currently thin/absent):
health.rs -- SctlState from_str + Display (8 variants, ~3 tested; Unknown fallthrough untested).
command_line.rs -- HbnConfigMode::from_str (zero tests today).
containerd/image.rs -- container_image_name_to_component regex (no direct unit tests).
Add carbide-test-support to [dev-dependencies].
Acceptance
- Adopted clusters preserve coverage; the added tables genuinely raise it.
cargo test -p <agent pkg> green; cargo clippy --all-features + cargo make format-nightly clean.
Size: M-L
Part of #2692.
The
agentcrate doesn't use the table helper at all, yet it's full of per-case parser/predicate clusters -- the largest single adoption target in Wave 2. This adoptscarbide-test-supportacross its parser tests and closes a few coverage gaps the per-case style left open.Scope
Adopt the helper (collapse per-case clusters):
health/bgp.rs-- the 8verify_bgp_summarytests (each rebuilds the same scaffold) -> onecheck_casestable keyed on a named struct ({ json, host_routes, route_servers, expected_alerts }).nvue.rs--split_prefixes_by_family(7 near-identical) ->value_scenarios!.command_line.rs--AgentPlatformType/HbnConfigModefrom_str+ thefor value in [...]loop -> tables.health.rs--parse_status/parse_disk_utilization/parse_mlxprivhost-> tables.Add coverage (table-shaped, currently thin/absent):
health.rs--SctlStatefrom_str+Display(8 variants, ~3 tested;Unknownfallthrough untested).command_line.rs--HbnConfigMode::from_str(zero tests today).containerd/image.rs--container_image_name_to_componentregex (no direct unit tests).Add
carbide-test-supportto[dev-dependencies].Acceptance
cargo test -p <agent pkg>green;cargo clippy --all-features+cargo make format-nightlyclean.Size: M-L
Part of #2692.