Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses failing xcpng integration tests by ensuring environment clean-up (zone/pod/cluster re-enable) happens even when intermediate test steps throw exceptions.
Changes:
- Wrap destructive test steps in
try/finallyto guarantee zones are re-enabled after System VM/IP range operations. - Wrap redundant-router deployment planning scenarios in
try/finallyto re-enable pods/clusters even on test failures.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/integration/smoke/test_public_ip_range.py | Ensures the zone allocation state is always restored to Enabled after destructive steps. |
| test/integration/component/maint/test_redundant_router_deployment_planning.py | Ensures pods/clusters are re-enabled even when network/VM/router assertions fail mid-test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| cmd = updateCluster.updateClusterCmd() | ||
| cmd.id = cluster.id | ||
| cmd.allocationstate = 'Enabled' | ||
| self.apiclient.updateCluster(cmd) |
| self.assertNotEqual( | ||
| routers[0].hostid, | ||
| routers[1].hostid, | ||
| "Both the routers should be in different storage pools" |
| cmd = updateZone.updateZoneCmd() | ||
| cmd.id = self.zone.id | ||
| cmd.allocationstate = 'Enabled' | ||
| self.apiclient.updateZone(cmd) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12812 +/- ##
=========================================
Coverage 16.25% 16.25%
+ Complexity 13425 13423 -2
=========================================
Files 5662 5662
Lines 500167 500167
Branches 60740 60740
=========================================
Hits 81318 81318
Misses 409763 409763
Partials 9086 9086
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17132 |
7ea21ab to
20fb1f6
Compare
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17133 |
Description
This PR fixes xcpng test failures
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?