fix(tests,admin-cli): output of rack/switch show tests - #5580
Conversation
Signed-off-by: Dmitry Porokh <dporokh@nvidia.com>
|
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 (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. Summary by CodeRabbit
WalkthroughThe rack show command now writes all output formats through supplied writers and propagates rendering errors. Rack and switch formatting tests capture output and validate its contents. ChangesCLI output rendering
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change only adjusts rack and switch CLI tests to suppress unintended output and add assertions; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a8da7d4ee
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ]; | ||
| show_table(&outputs); | ||
| let mut rendered = Vec::new(); | ||
| show_table(&outputs, &mut rendered).unwrap(); |
There was a problem hiding this comment.
Exercise the public rack command in the table test
Calling show_table directly and checking only prefixes through the Compute Trays column allows regressions in command dispatch, headers, and the Power Shelves/Switches cells to pass. Exercise the public rack show command and assert the rendered headers as well as populated and empty values for every column, as required for user-visible CLI table changes.
AGENTS.md reference: AGENTS.md:L147-L149
Useful? React with 👍 / 👎.
Suppress print to stdout during test run in rack/switch admin cli tests, added assertions for these tests.
Related issues
N/A
Type of Change
Breaking Changes
Testing
Additional Notes