Adding changes to properly pass/fail a scenario if errors occur#1065
Adding changes to properly pass/fail a scenario if errors occur#1065paigerube14 merged 1 commit intokrkn-chaos:mainfrom
Conversation
2a29388 to
8ed7a6d
Compare
|
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
890abcd to
32a0dba
Compare
32a0dba to
7d526e1
Compare
Review Summary by QodoAdd proper error handling and return codes to scenario plugins
WalkthroughsDescription• Add proper error handling and return codes to scenario plugins - ManagedClusterScenarioPlugin: Fix early return preventing multiple actions - ZoneOutageScenarioPlugin: Capture and propagate return values from zone methods - ZoneOutageScenarioPlugin: Wrap network_based_zone in try-catch for exception handling • Add tearDown methods to test classes for proper cleanup • Add comprehensive test coverage for error handling and return codes Diagramflowchart LR
A["Scenario Plugins"] -->|"Fix early returns"| B["ManagedClusterScenarioPlugin"]
A -->|"Capture return values"| C["ZoneOutageScenarioPlugin"]
C -->|"Add exception handling"| D["network_based_zone method"]
E["Test Classes"] -->|"Add tearDown cleanup"| F["Multiple Test Files"]
E -->|"Add error handling tests"| G["New Test Cases"]
File Changes1. krkn/scenario_plugins/managed_cluster/managed_cluster_scenario_plugin.py
|
Code Review by Qodo
1. ZoneOutage run() masks exit codes
|
krkn/scenario_plugins/zone_outage/zone_outage_scenario_plugin.py
Outdated
Show resolved
Hide resolved
472e8e3 to
2740f71
Compare
Signed-off-by: Paige Patton <prubenda@redhat.com>
…-chaos#1065) Signed-off-by: Paige Patton <prubenda@redhat.com>
Type of change
Description
Adding in return status' in a few scenarios to properly fail when an exception occurs
Related Tickets & Documents
If no related issue, please create one and start the converasation on wants of
Documentation
If checked, a documentation PR must be created and merged in the website repository.
Related Documentation PR (if applicable)
<-- Add the link to the corresponding documentation PR in the website repository -->
Checklist before requesting a review
See testing your changes and run on any Kubernetes or OpenShift cluster to validate your changes
REQUIRED:
Description of combination of tests performed and output of run
OR