← Back to Pull requests

[Storage] Add tests for storage migration cleanup feature #6342

Closed
unknown closed this pull request without merging on Oct 14, 2026 11:01 UTC
View on GitHub
unknown unknown commented on Sep 17, 2026 07:45 UTC
Author

##### What this PR does / why we need it:
Add automated tests for storage migration cleanup functionality. Tests cleanup of migration plans after successful migration, depending on migration policy.

NOTE: there are 3 tests QUARANTINED because either the failure scenarios are not clarified/covered by current migration functionality, and one related to this bug: https://redhat.atlassian.net/browse/CNV-96425
List of quarantined tests: test_namespace_keep_overrides_plan_delete test_failed_migration_with_delete_source_policy test_failed_migration_with_keep_source_policy
##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:
https://redhat.atlassian.net/browse/CNV-77498

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

  • Tests

  • - Expanded automated storage migration coverage for running and stopped virtual machines, including online and offline migrations across namespaces.
    - Added checks for source-volume retention and deletion under default, namespace-level, migration-plan, and combined policies.
    - Added verification of migration phases, target storage updates, and whether source volumes are retained or deleted.
    - Added scenarios for invalid storage classes and failed migrations; some policy-override and failure-case checks remain quarantined.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 181 lines (+135 / -46) across 2 files Reviewer: acinko-rh Review duration: 39076m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.64) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.64 · 181 lines diff across 2 files
    0.64
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.311
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.064
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #6342"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 63.8% (MEDIUM) · Higher = larger blast radius
    63.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 25.2% · Safe to merge
    25.2%