test(health): enumerate configuration validation boundaries#3971
Conversation
Replace the mutable top-level validation sequence and repeated log, TLS, and NMX-C tests with independent carbide-test-support scenarios that pin exact errors. Add the missing cluster, endpoint identity, OTLP TLS, SSE, worker, and metrics boundaries while keeping child validators authoritative. This supports NVIDIA#3967 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
@coderabbitai full_review, thanks! |
|
ᕱ⑅ᕱ ✅ Action performedFull review finished. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThe PR refactors health configuration tests with shared builders, projection helpers, and ChangesHealth configuration test modernization
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Configuration validation was spread across one mutable assertion sequence, repeated child-validator tests, and several
is_err()checks that did not pin which rule rejected an input.This replaces those tests with independent
carbide-test-supportscenarios. Direct tables now own the cluster, static endpoint, OTLP, TLS, log collector, and NMX-C contracts, while the top-level table keeps its own rules and representative delegation checks. Each failure row compares the exact error text.The expansion rows cover the previously missing cluster-source contract, static power-shelf and switch identities, OTLP flush/TLS boundaries, switch mTLS paths, SSE zero backoffs, log delegation, report-sink workers, and invalid metrics endpoints.
Coverage checkpoints from the same parent:
291/331 -> 291/331 -> 331/331312/354 -> 312/354 -> 354/354config.rsproduction lines:629/713 -> 629/713 -> 688/7135,383 -> 5,383 -> 5,321Related issues
Supports #3967
Type of Change
Breaking Changes
Testing
cargo test --locked --package carbide-health --libcargo make format-nightlycargo make clippycargo make carbide-lintsAdditional Notes
The conversion-only checkpoint preserved every covered production line and region before the expansion rows were added. Twelve repeated test functions and overlapping top-level child-validator cases were removed or consolidated.
Closes #3967