Skip to content

chore: add integration tests for expected power shelf and switch discovery#1960

Open
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:expected-powershelf-switch-integration-tests
Open

chore: add integration tests for expected power shelf and switch discovery#1960
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:expected-powershelf-switch-integration-tests

Conversation

@chet
Copy link
Copy Markdown
Contributor

@chet chet commented May 27, 2026

Something I started to/meant to do a while back. Catching up!

This lands as two new subtests of test_integration, running alongside the existing machine tests against the shared carbide-api + site-explorer. Each one registers an expected entity, simulates the BMC showing up via DHCP, stands up a mock BMC at the assigned IP, then waits for site-explorer to link it to a real managed PowerShelf / Switch (and confirms we can fetch it back by ID). The power shelf test includes exercising the work from #842, ensuring "service root vendor not populated" happens (and is logged) right before it falls back and links successfully.

Notable changes in here:

  • Flipped on create_power_shelves / create_switches in the test site-explorer config -- they default off, so the explorer wasn't creating either of them in tests (took me a sec to be like uhhh...).
  • New test_support::host_bmc_router in bmc-mock so a test can hand a mock BMC router to the shared registry, without making the internal NoopCallbacks public.
  • New power_shelf, switch, and dhcp helpers in api-test-helper, which are built on the existing grpcurl helper just like tenant/vpc/subnet

Description

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

…overy

These land as two new subtests of `test_integration`, running alongside the existing machine tests against the shared `carbide-api` + `site-explorer`. Each one registers an expected entity, simulates the BMC showing up via DHCP, stands up a mock BMC at the assigned IP, then waits for `site-explorer` to link it to a real managed `PowerShelf` / `Switch` (and confirms we can fetch it back by ID). The power shelf test includes exercising the work from NVIDIA#842, ensuring "*service root vendor not populated*" happens (and is logged) right before it falls back and links successfully.

Notable changes in here:
- Flipped on `create_power_shelves` / `create_switches` in the test `site-explorer` config -- they default off, so the explorer wasn't creating either of them in tests (took me a sec to be like uhhh...).
- New `test_support::host_bmc_router` in `bmc-mock` so a test can hand a mock BMC router to the shared registry, without making the internal `NoopCallbacks` public.
- New `power_shelf`, `switch`, and `dhcp` helpers in `api-test-helper`, which are built on the existing `grpcurl` helper just like `tenant`/`vpc`/`subnet`

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet chet requested a review from a team as a code owner May 27, 2026 19:24
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.

1 participant