Skip to content

carbide-test-support integration -- finish the migration, extend the coverage #2692

Description

@chet

We've been turning a large, redundant test suite into table-driven tests built on a small shared helper, carbide-test-support. The first wave migrated the core crates and has merged -- the 1 == 1-style tests are gone and most per-case copy-paste is collapsed. Two kinds of work remain, and this Epic tracks them.

Why this exists. Some of the original context has faded, so to restate it: the goal is a test suite where a function's behavior is described once, as a labeled table of inputs and expected results, instead of as dozens of near-identical hand-written tests. That makes coverage easy to read, cheap to extend, and hard to lose by accident. carbide-test-support is the small zero-dependency helper that expresses those tables; STYLE_GUIDE.md documents how to use it.

Wave 1 -- finish the cleanup on already-migrated crates. Seven PRs, all test-only and low-risk:

  • Document the helper's real idiom (the module docs currently lead with a form almost nobody uses).
  • A correctness fix for tests that look like coverage but never run -- or can't fail.
  • Collapse leftover one-function-per-variant clusters into tables, and remove tests that earn nothing, across api-model / rpc / uuid, admin-cli / libmlx / ib-fabric, mqttea / dpf, api-db / health, and api-core.

These are the child issues below.

Wave 2 -- extend to the crates that never adopted the helper (planned; opened once Wave 1 is moving). Several crates carry exactly the logic the helper is built for -- parsers, validators, state-transition and enum mappings -- tested today by hand-rolled per-case functions or not at all: authn, component-manager, secrets, ssh-console, rack-controller, agent, and dhcp / dhcp-server, with smaller adoptions in dns, dsx-exchange-consumer, kms-provider, bms-dsx-exchange, and rvs, plus coverage additions in ipxe-renderer and rack. The docs issue lands first so each new crate follows the documented idiom.

Each child issue is one PR. One commit per PR.

Metadata

Metadata

Assignees

Labels

featureFeature (deprecated - use issue type, but it's needed for reporting now)roadmapRoadmap item with program-level tracking

Type

No fields configured for Epic.

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions