Onboarding: Replace flavor selection logic with value#272
Conversation
📝 WalkthroughWalkthroughThe PR replaces dynamic OpenStack flavor discovery logic with a static Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip CodeRabbit can generate a title for your PR based on the changes with custom instructions.Set the |
The logic was unfortunately brittle, so let's drop it in favor of a configuration value.
Merging this branch will decrease overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/controller/onboarding_controller_test.go (1)
92-110: Consider removing unusedflavorDetailsBodyconstant.This constant appears to be dead code after removing the
/flavors/detailendpoint mock. Since flavor discovery is now replaced by the configurableTestFlavorID, this mock data is no longer needed.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/controller/onboarding_controller_test.go` around lines 92 - 110, Remove the dead constant declaration flavorDetailsBody from the test file since the /flavors/detail mock was removed and flavor discovery now uses TestFlavorID; locate the flavorDetailsBody variable in onboarding_controller_test.go and delete its declaration (and any unused surrounding variables or imports that become unused as a result), but do not change any tests that rely on TestFlavorID.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@internal/controller/onboarding_controller_test.go`:
- Around line 92-110: Remove the dead constant declaration flavorDetailsBody
from the test file since the /flavors/detail mock was removed and flavor
discovery now uses TestFlavorID; locate the flavorDetailsBody variable in
onboarding_controller_test.go and delete its declaration (and any unused
surrounding variables or imports that become unused as a result), but do not
change any tests that rely on TestFlavorID.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8bb6dda8-4f59-49c7-9600-a06994557eef
📒 Files selected for processing (2)
internal/controller/onboarding_controller.gointernal/controller/onboarding_controller_test.go
The logic was unfortunately brittle, so let's drop it with a configuration value.
Summary by CodeRabbit
Refactor
Tests