← Back to Pull requests

test/e2e: Enhance E2E Test Suite Flexibility and Configurability #3475

Closed
unknown closed this pull request without merging on Nov 30, 2026 13:26 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 06:52 UTC
Author

This Pull Request enhances the flexibility and configurability of the E2E test suite. It introduces environment-driven configurations and chainable builder methods to allow tests to run cleanly in custom or constrained test environments.

Specifically, it addresses three main aspects:
1. Configurable CAA Pod Labeling: Allows custom label key-value pairs to identify Cloud API Adaptor (CAA) pods.
2. Configurable Libvirt Assertion Timeout: Replaces the hardcoded 1-minute timeout with a configurable field.
3. Conditional PodVM Validation Skipping: Centralizes a bypass mechanism via the SKIP_PODVM_VALIDATION environment variable for environments where direct PodVM status checks/retrievals are restricted or unsupported.

---

Detailed Changes

🏷️ 1. Configurable CAA Pod Labels


Added GetCAAPodLabel() helper to the test provisioner package (test/provisioner/provision.go). This reads TEST_CAA_POD_LABEL_NAME and TEST_CAA_POD_LABEL_VALUE environment variables, defaulting to app=cloud-api-adaptor if unset.
Updated the getCaaPod() helper (test/e2e/assessment_helpers.go) to query dynamic labels using this new helper rather than expecting hardcoded label keys/values.

⏱️ 2. Configurable Libvirt Assert Timeout


Added timeout time.Duration field to LibvirtAssert struct (test/e2e/libvirt_common.go).
Initialized timeout to 1 time.Minute during construction of the assert helper.
Added a chainable builder method SetTimeout(timeout time.Duration) LibvirtAssert.
Modified DefaultTimeout() to return the configured timeout duration dynamically instead of a hardcoded 1-minute value.

🚫 3. Conditional PodVM Validation Skipping


Added SkipPodVMValidation() to the provisioner package to check for SKIP_PODVM_VALIDATION=true.
Created a centralized package-level helper skipPodVMValidation() in test/e2e/assessment_helpers.go to wrap and log when validation is being bypassed.
  • Refactored test call sites in test/e2e/assessment_runner.go and test/e2e/nginx_deployment.go to check !skipPodvmValidation() before querying and asserting on PodVM resource limits and existence.
  • Diff: 269 lines (+201 / -68) across 3 files Reviewer: stevenhorsman Review duration: 17673m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 269 lines diff across 3 files
    0.63
    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.335
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #3475"
    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: 62.6% (MEDIUM) · Higher = larger blast radius
    62.6%
    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: 24.7% · Safe to merge
    24.7%