← Back to Pull requests

ROX-37465: Remove remaining duplicate e2e tests #1483

Closed
unknown closed this pull request without merging on Oct 16, 2026 01:51 UTC
View on GitHub
unknown unknown commented on Oct 14, 2026 13:53 UTC
Author

Removes five duplicate e2e tests that exist in two suites, as part of the e2e test consolidation tracked in ROX-37465. For items 1 and 2, the serial copy (which is the better one) is moved into scan-config; for items 3–4 the duplicate is deleted outright; for item 5 the deployment copy is kept with the race fix ported in and the parsing copy is deleted.

Changes

| Subtask | Test | Action | Kept copy | Reason |
|---------|------|--------|-----------|--------|
| ROX-37576 | TestTolerations | Replace scan-config body with serial body, delete from serial | scan-config (now has serial body) | Serial is a strict superset: Phase 1 tests automatic toleration injection + AssertAllScannerPodsHaveToleration on both phases. Scan-config only had Phase 2 without those assertions. |
| ROX-37573 | TestStrictNodeScanConfiguration | Apply serial polling fix to scan-config, delete from serial | scan-config (now has serial fix) | Serial carries fix from aa2fb6c7f ("CMP-4823"): polls suite.Status.Phase != "" before asserting PENDING for 30s. Scan-config only waited for suite existence — a race condition. |
| ROX-37575 | TestSuiteScanHasCheckCounts | Delete from serial | TestSuiteScan (same file) | Pure duplicate: builds the same two-scan ComplianceSuite and its only assertions (AssertScanIsNonCompliant + AssertScanHasTotalCheckCounts on both scans) are already the closing assertions of TestSuiteScan. |
| ROX-37577 | TestMixProductScan | Delete from serial | TestScanHasProfileGUID (same file) + TestSuspendScanSetting (scan-config) | TestScanHasProfileGUID binds a superset of its profiles. Custom ScanSetting (Suspend: false, Schedule, Timeout) is covered by TestSuspendScanSetting in scan-config. |
| ROX-37574 | TestProfileBundleDefaultIsKept | Keep deployment copy with race fix ported in, delete parsing copy | deployment (with race fix from 1264b3087) | The deployment suite's run_if_changed covers cmd/manager/ (the code this test exercises); the parsing suite's does not. Race fix (UID-polling instead of time.Sleep) and updateErr bug fix ported from the parsing copy. |

TestTolerations and TestStrictNodeScanConfiguration do not call t.Parallel() — both mutate a shared worker node (taint and cordon respectively). Keeping them sequential prevents collisions with scan-config's parallel tests.

Import cleanup

  • serial/main_test.go: Removed apierrors (only used by TestStrictNodeScanConfiguration)

  • deployment/main_test.go: Added types, client imports needed by the race-fixed TestProfileBundleDefaultIsKept

  • parsing_tests/main_test.go: Verified no orphaned imports after TestProfileBundleDefaultIsKept deletion
  • Interaction with PR #1451

    PR #1451 ("CMP-4824: Run most serial e2e tests in parallel") rewrites much of tests/e2e/serial/main_test.go to run tests concurrently using per-test MachineConfigPool lanes. It is already marked CONFLICTING and needs a rebase regardless. This PR affects it as follows:

  • TestTolerations moves to tests/e2e/scan-config/main_test.go. #1451 converts it to a lane test via f.AcquireTestPool(t); that conversion needs to be re-applied against its new home after the rebase.

  • TestSuiteScanHasCheckCounts and TestMixProductScan are deleted. #1451 converts both to f.ScanPhaseTest(t, ...); those two conversions can simply be dropped, which reduces #1451's remaining work.

  • TestStrictNodeScanConfiguration and TestProfileBundleDefaultIsKept do not overlap with #1451.
  • Verification

    go build ./tests/e2e/...          # clean
    go vet ./tests/e2e/scan-config/... ./tests/e2e/serial/... ./tests/e2e/deployment/... ./tests/e2e/parsing_tests/...  # clean
    gofmt -l tests/e2e/               # clean (on modified files)
    go test -run XXX_NONE ./tests/e2e/scan-config ./tests/e2e/serial ./tests/e2e/deployment ./tests/e2e/parsing_tests  # binaries compile
    

    ---
    AI-generated. Review for accuracy.

    @rhmdnd requested from Slack

    [ROX-37465]: https://redhat.atlassian.net/browse/ROX-37465?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
    [ROX-37576]: https://redhat.atlassian.net/browse/ROX-37576?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
    [ROX-37573]: https://redhat.atlassian.net/browse/ROX-37573?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
    [ROX-37575]: https://redhat.atlassian.net/browse/ROX-37575?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 613 lines (+459 / -154) across 7 files Reviewer: Vincent056 Review duration: 2157m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 613 lines diff across 7 files
    0.50
    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.384
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1483"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 50.2% (MEDIUM) · Higher = larger blast radius
    50.2%
    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: 19.8% · Safe to merge
    19.8%