chore: add integration tests for expected power shelf and switch discovery#1960
Open
chet wants to merge 1 commit into
Open
chore: add integration tests for expected power shelf and switch discovery#1960chet wants to merge 1 commit into
chet wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 sharedcarbide-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 forsite-explorerto link it to a real managedPowerShelf/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:
create_power_shelves/create_switchesin the testsite-explorerconfig -- they default off, so the explorer wasn't creating either of them in tests (took me a sec to be like uhhh...).test_support::host_bmc_routerinbmc-mockso a test can hand a mock BMC router to the shared registry, without making the internalNoopCallbackspublic.power_shelf,switch, anddhcphelpers inapi-test-helper, which are built on the existinggrpcurlhelper just liketenant/vpc/subnetDescription
Type of Change
Related Issues (Optional)
Breaking Changes
Testing
Additional Notes