[scanner] fix: update nil-storage test for graceful nil-guard behavior#19970
Conversation
Fixes #19968 The recent nil-guard additions in #19951 changed solver behavior to handle nil storage gracefully instead of panicking. This updates TestSolveLoopWithNilStorage to verify the new graceful behavior rather than expecting a panic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@hive.kubestellar.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole canceled.
|
|
🐝 Hi @clubanderson! I'm Trusted users — org members and contributors with write access — can mention Automation may take a moment to start, and follow-up happens through workflow activity rather than chat replies. |
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
There was a problem hiding this comment.
Pull request overview
Updates the solver’s nil-storage regression test to reflect the current contract: SolveLoop should handle nil storage defensively (no panic) rather than crashing.
Changes:
- Updated
TestSolveLoopWithNilStorageto fail only if a panic occurs (instead of expecting one). - Refreshed test comments to describe the intended graceful nil-guard behavior.
| SolveLoop(ctx, input, nil, nil, broadcaster) | ||
| // If we reach here without panicking, the test passes |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
✅ Post-Merge Verification: passedCommit: |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
Fixes #19968
The recent nil-guard additions in #19951 changed solver behavior to handle nil storage gracefully instead of panicking. This updates
TestSolveLoopWithNilStorageto verify the new graceful behavior rather than expecting a panic.Changes
Testing
Verified the fix compiles with
go build ./pkg/stellar/solver/Signed-off-by: scanner scanner@hive.kubestellar.io