Skip to content

chore: add integration tests for expected power shelves and switches#844

Open
chet wants to merge 1 commit intoNVIDIA:mainfrom
chet:power_shelf_switch_ingestion_integration_tests
Open

chore: add integration tests for expected power shelves and switches#844
chet wants to merge 1 commit intoNVIDIA:mainfrom
chet:power_shelf_switch_ingestion_integration_tests

Conversation

@chet
Copy link
Copy Markdown
Contributor

@chet chet commented Apr 8, 2026

Description

I recently did #842 to fix an issue with expected power shelf ingestion, and wanted to put together an integration test for it. While I was doing that, I realized it might be nice to have equivalent tests for switches and power shelves, and figured I'd do it as a separate PR.

Signed-off-by: Chet Nichols III chetn@nvidia.com

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@chet chet requested a review from a team as a code owner April 8, 2026 00:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-04-08 00:10:48 UTC | Commit: 0969fbd

I recently did NVIDIA#842 to fix an issue with expected power shelf ingestion, and wanted to put together an integration test for it. While I was doing that, I realized it might be nice to have equivalent tests for switches and power shelves, and figured I'd do it as a separate PR.

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet chet force-pushed the power_shelf_switch_ingestion_integration_tests branch from 0969fbd to 5c0aed6 Compare April 8, 2026 01:01
let client = build_api_client(test_env);

// Create a Lite-On power shelf BMC mock. HostMachineInfo::new generates a unique MAC address.
let host_info = bmc_mock::HostMachineInfo::new(HostHardwareType::LiteOnPowerShelf, vec![]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HostMachine? :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh boy, this is bmc-mock naming failure. What is right term that joins switches powershelves and host machines?

Copy link
Copy Markdown
Contributor

@Matthias247 Matthias247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is ok. But we also should have equivalents of env.create_managed_host() for switches and powershelves that do all of this behind the scenes. Most tests would be using these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants