← Back to Pull requests

run: Verify SNR conditions with non-existent node name w/ wao #118

Open
weshayutin opened this pull request with 1795 lines diff across 17 files
View on GitHub
weshayutin weshayutin commented on Nov 04, 2026 18:46 UTC
Author

reusing existing tests, just adding pre and post functions to enable wao / snr . Also ensuring clean up is tagged for wao. I need to sit on this.. but it's working :)

ginkgo -v --label-filter="$ECO_TEST_LABELS" --focus="SNR conditions" ./tests/snr-operator | tee /tmp/waosnr1
Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
  Ginkgo CLI Version:
    2.33.0
  Mismatched package versions found:
    2.32.0 used by snr-operator

  Ginkgo will continue to attempt to run but you may see errors (including flag
  parsing errors) and should either update your go.mod or your version of the
  Ginkgo CLI to match.

  To install the matching version of the CLI run
    go install github.com/onsi/ginkgo/v2/ginkgo
  from a path that contains a go.mod file.  Alternatively you can use
    go run github.com/onsi/ginkgo/v2/ginkgo
  from a path that contains a go.mod file to invoke the matching version of the
  Ginkgo CLI.

  If you are attempting to test multiple packages that each have a different
  version of the Ginkgo library with a single Ginkgo CLI that is currently
  unsupported.
  
2026/11/04 11:30:07 Creating new GeneralConfig struct
2026/11/04 11:30:07 Creating new Medik8sConfig struct
2026/11/04 11:30:07 Creating new GeneralConfig struct
2026/11/04 11:30:07 Creating new GeneralConfig struct
Running Suite: SNR - /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator
[medik8s, snr] 
==============================================================================================
Random Seed: 1793817006

Will run 2 of 26 specs
------------------------------
[BeforeSuite] 
/home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/snr_suite_test.go:46
  STEP: Ensuring the SNR operand is enabled and Available @ 11/04/26 11:30:07.894
[BeforeSuite] PASSED [10.277 seconds]
------------------------------
SSSSSS
------------------------------
SNR Processing Condition tests when SNR has nhc-timed-out annotation Verify SNR conditions with nhc-timed-out annotation [operator:snr, 60881, test_id:60881, tier:acceptance, disruption:nondestructive, platform:any, frequency:weekly, component:controller]
/home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/processing_conditions.go:55
  STEP: Verify SNR deployment is ready @ 11/04/26 11:30:18.171
  STEP: Creating SNR with nhc-timed-out annotation @ 11/04/26 11:30:18.287
  STEP: Waiting for Processing and Succeeded conditions to reflect NHC timed-out state @ 11/04/26 11:30:18.391
• [10.398 seconds]
------------------------------
SNR Processing Condition tests when SNR targets a non-existent node Verify SNR conditions with non-existent node name [operator:snr, 70584, test_id:70584, tier:acceptance, disruption:nondestructive, platform:any, frequency:weekly, component:controller]
/home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/processing_conditions.go:105
  STEP: Verifying test node name does not exist in the cluster @ 11/04/26 11:30:28.569
  STEP: Creating SNR with non-existent node name @ 11/04/26 11:30:28.662
  STEP: Waiting for Processing and Succeeded conditions to reflect node-not-found state @ 11/04/26 11:30:28.709
• [5.277 seconds]
------------------------------
SSSSSSSSSSSSSSSSSS
------------------------------
[AfterSuite] 
/home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/snr_suite_test.go:72
  STEP: Reporting the state the SNR operand ended the run in @ 11/04/26 11:30:33.846
  AfterSuite: operand selfNodeRemediation phase=Available (left enabled on purpose)
  AfterSuite: operand selfNodeRemediation running=true (self-node-remediation-controller-manager 2/2)
  STEP: Sweeping up SelfNodeRemediation CRs the suite left behind @ 11/04/26 11:30:33.959
[AfterSuite] PASSED [0.153 seconds]
------------------------------
[ReportAfterSuite] 
/home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/snr_suite_test.go:171
[ReportAfterSuite] PASSED [0.003 seconds]
------------------------------
[ReportAfterSuite] Autogenerated ReportAfterSuite for --junit-report
autogenerated by Ginkgo
[ReportAfterSuite] PASSED [0.001 seconds]
------------------------------

Ran 2 of 26 Specs in 26.106 seconds
SUCCESS! -- 2 Passed | 0 Failed | 0 Pending | 24 Skipped
PASS

Ginkgo ran 1 suite in 27.25660884s
Test Suite Passed

Diff: 1795 lines (+1652 / -143) across 17 files Reviewer: weshayutin Review duration: 39515m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.86) × (1 − Review Confidence (0.83)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.86 · 1795 lines diff across 17 files
0.86
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 5 substantive comment(s)
0.89
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
83%
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.400
Self Review self_review
0.140
Mass File Touch mass_file_touch
0.080
Real PR Conversation Timeline
8 items
openshift-ci[bot] openshift-ci[bot] commented on Nov 04, 2026 18:46 UTC
Bot

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

coderabbitai[bot] coderabbitai[bot] commented on Nov 04, 2026 18:46 UTC
Bot

<!-- coderabbit-ai-generated:v1 -->

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: skip review by coderabbit.ai -->

[!IMPORTANT]

## Draft PR not reviewed

> Draft PRs are not automatically reviewed by default.

> - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> Trigger a manual review

> To automatically review draft PRs, update your CodeRabbit configuration:

>
> reviews:
>   auto_review:
>     drafts: true
> 

<!-- end of auto-generated comment: skip review by coderabbit.ai -->

openshift-ci[bot] openshift-ci[bot] commented on Nov 04, 2026 18:46 UTC
Bot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jonahsussman for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

<details open>
Needs approval from an approver in each of these files:

  • OWNERS
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":["jonahsussman"]} -->

    weshayutin weshayutin commented on code on Nov 04, 2026 18:48 UTC
    Code Review
    tests/internal/helpers/wao.go:1
    @@ -97,6 +104,182 @@ func DisableWAOComponents(ctx context.Context, k8sClient client.Client, componen
     	return SetWAOComponents(ctx, k8sClient, waoComponentStates(false, components))
     }
     
    +// ErrWAONotInstalled reports a cluster with no WorkloadAvailabilityConfig singleton: either the
    +// CRD is absent or WAO has not bootstrapped the CR. A run that asked for the WAO layout with
    +// labels.OperatorWAO and lands on such a cluster has nothing to enable, so this is a failure
    +// rather than something to work around.
    +var ErrWAONotInstalled = errors.New("workload-availability-operator is not installed")
    +
    +// WAORunRequested reports whether this run asked for the workload-availability-operator layout,
    +// which is what makes a suite enable its operand before its specs. Operand enablement is opt-in:
    +// on a pre-WAO cluster the operators are installed individually and there is nothing to enable,
    +// and a suite that patched a WorkloadAvailabilityConfig there would fail for the wrong reason.
    +//
    +// The opt-in is labels.OperatorWAO appearing in the run's Ginkgo label filter — ECO_TEST_LABELS
    +// when the run came through scripts/test-runner.sh, otherwise ginkgoLabelFilter, the
    +// --label-filter given to ginkgo directly. Because a suite's own specs carry their operator
    +// label and not labels.OperatorWAO, select both:
    +//
    +//	ECO_TEST_LABELS='operator:wao || operator:snr'
    +//
    +// A filter that negates the label (!operator:wao) does not request the WAO layout.
    +func WAORunRequested(ginkgoLabelFilter string) bool {
    +	filter := os.Getenv("ECO_TEST_LABELS")
    +	if filter == "" {
    +		filter = ginkgoLabelFilter
    +	}
    +
    +	isSeparator := func(r rune) bool {
    +		return r == '&' || r == '|' || r == '(' || r == ')' || r == ',' || unicode.IsSpace(r)

    this looks stupid

    weshayutin weshayutin commented on code on Nov 04, 2026 18:49 UTC
    Code Review
    tests/internal/helpers/wao_test.go:1
    @@ -204,3 +205,94 @@ func TestWAOComponentPhase(t *testing.T) {
     		}
     	}
     }
    +
    +// waoStatus sets status.components for the given operand phases.
    +func waoStatus(config *unstructured.Unstructured, phases map[string]string) *unstructured.Unstructured {
    +	statuses := make([]interface{}, 0, len(phases))
    +	for component, phase := range phases {
    +		statuses = append(statuses, map[string]interface{}{"name": component, "phase": phase})
    +	}
    +	config.Object["status"] = map[string]interface{}{"components": statuses}
    +
    +	return config
    +}
    +
    +func TestEnsureWAOComponentsLeavesAnAvailableOperandAlone(t *testing.T) {
    +	config := waoStatus(waoConfig(map[string]interface{}{
    +		medik8sparams.WAOComponentSNR: map[string]interface{}{
    +			"enabled": true,
    +			"manager": map[string]interface{}{"replicas": int64(2)},
    +		},
    +	}), map[string]string{medik8sparams.WAOComponentSNR: medik8sparams.WAOPhaseAvailable})
    +	k8sClient := waoClient(config)
    +	before, err := GetWAOConfig(context.Background(), k8sClient)
    +	if err != nil {
    +		t.Fatalf("GetWAOConfig: %v", err)
    +	}
    +
    +	if ensureErr := EnsureWAOComponents(
    +		context.Background(), k8sClient, medik8sparams.WAOComponentSNR); ensureErr != nil {
    +		t.Fatalf("EnsureWAOComponents: %v", ensureErr)
    +	}
    +
    +	after, err := GetWAOConfig(context.Background(), k8sClient)
    +	if err != nil {
    +		t.Fatalf("GetWAOConfig: %v", err)
    +	}
    +	// An operand that is already Available must not be patched: a bumped resourceVersion here
    +	// means a suite rerun restarted a manager its specs were about to use.
    +	if before.GetResourceVersion() != after.GetResourceVersion() {
    +		t.Errorf("configuration was patched for an already Available operand: resourceVersion %s -> %s",
    +			before.GetResourceVersion(), after.GetResourceVersion())
    +	}
    +}
    +
    +func TestEnsureWAOComponentsReportsAPreWAOCluster(t *testing.T) {
    +	err := EnsureWAOComponents(context.Background(), waoClient(), medik8sparams.WAOComponentSNR)
    +	if !errors.Is(err, ErrWAONotInstalled) {
    +		t.Fatalf("EnsureWAOComponents error = %v, want one matching ErrWAONotInstalled", err)
    +	}
    +}
    +
    +func TestEnsureWAOComponentsRejectsNoOperand(t *testing.T) {
    +	if err := EnsureWAOComponents(context.Background(), waoClient()); err == nil {
    +		t.Fatal("expected an error when no operand is named")
    +	}
    +}
    +
    +func TestWAORunRequestedReadsTheLabelFilter(t *testing.T) {
    +	for filter, want := range map[string]bool{
    +		"operator:wao":                                 true,
    +		"operator:wao || operator:snr":                 true,
    +		"operator:snr||operator:wao":                   true,
    +		"(operator:wao || operator:snr) && tier:smoke": true,
    +		"operator:snr":                                 false,
    +		"":                                             false,

    @abrugaro hrm.. you'll want to comment on this

    weshayutin weshayutin commented on Nov 04, 2026 19:16 UTC
    Author

    ran a larger non-destructive suite.. Note.. due to race conditions, this will fail if SNR starts disabled and is enabled by the test.

    whayutin@whayutin-thinkpadp1gen7:~/OPENSHIFT/git/MEDIK8S/rhwa-system-tests$ ginkgo -v --fail-fast --label-filter="$ECO_TEST_LABELS" ./tests/snr-operator 2>&1 | tee /tmp/waosnr7
    Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
      Ginkgo CLI Version:
        2.33.0
      Mismatched package versions found:
        2.32.0 used by snr-operator
    
      Ginkgo will continue to attempt to run but you may see errors (including flag
      parsing errors) and should either update your go.mod or your version of the
      Ginkgo CLI to match.
    
      To install the matching version of the CLI run
        go install github.com/onsi/ginkgo/v2/ginkgo
      from a path that contains a go.mod file.  Alternatively you can use
        go run github.com/onsi/ginkgo/v2/ginkgo
      from a path that contains a go.mod file to invoke the matching version of the
      Ginkgo CLI.
    
      If you are attempting to test multiple packages that each have a different
      version of the Ginkgo library with a single Ginkgo CLI that is currently
      unsupported.
      
    2026/11/04 12:12:16 Creating new GeneralConfig struct
    2026/11/04 12:12:16 Creating new Medik8sConfig struct
    2026/11/04 12:12:16 Creating new GeneralConfig struct
    2026/11/04 12:12:16 Creating new GeneralConfig struct
    Running Suite: SNR - /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator
    [medik8s, snr] 
    ==============================================================================================
    Random Seed: 1793819535
    
    Will run 15 of 26 specs
    ------------------------------
    [BeforeSuite] 
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/snr_suite_test.go:46
      STEP: Ensuring the SNR operand is enabled and Available @ 11/04/26 12:12:16.934
    [BeforeSuite] PASSED [0.264 seconds]
    ------------------------------
    SNR Post Deployment tests Verify SNR resources are installed and running [operator:snr, 54205, test_id:54205, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:daemonset]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:45
      STEP: Get SNR deployment object and verify readiness @ 11/04/26 12:12:17.199
      STEP: Verifying SelfNodeRemediationConfig exists @ 11/04/26 12:12:17.351
      STEP: Verifying SNR DaemonSet pods are running @ 11/04/26 12:12:17.437
      STEP: Verifying SNR DaemonSet pods do not set hostPort (KSV024) @ 11/04/26 12:12:17.551
      STEP: Verifying SNR controller-manager pods are running @ 11/04/26 12:12:17.596
    • [0.585 seconds]
    ------------------------------
    SNR Post Deployment tests RHWA-1984: Verify SNR DaemonSet containers set readOnlyRootFilesystem (KSV014) [operator:snr, 1984, test_id:1984, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:daemonset]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:125
      STEP: Waiting for SNR DaemonSet pods to be running @ 11/04/26 12:12:17.785
      STEP: Verifying SNR DaemonSet containers set readOnlyRootFilesystem (KSV014) @ 11/04/26 12:12:17.832
    • [0.096 seconds]
    ------------------------------
    SNR Post Deployment tests Verify only Automatic remediation template exists [operator:snr, 71010, test_id:71010, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:143
      STEP: Verifying Automatic SelfNodeRemediationTemplate exists @ 11/04/26 12:12:17.881
      STEP: Verifying remediation strategy is Automatic @ 11/04/26 12:12:17.929
      STEP: Verifying unsupported templates do not exist @ 11/04/26 12:12:17.929
    • [0.133 seconds]
    ------------------------------
    SNR Post Deployment tests Verify SNR CSV annotations [operator:snr, 52136, test_id:52136, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:olm]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:196
      [SKIPPED] in [It] - /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:201 @ 11/04/26 12:12:18.015
    S [SKIPPED] [0.000 seconds]
    SNR Post Deployment tests [It] Verify SNR CSV annotations [operator:snr, 52136, test_id:52136, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:olm]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:196
    
      [SKIPPED] SNR is a WAO operand on this run: there is no per-operand CSV to assert on, only the workload-availability-operator bundle
      In [It] at: /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:201 @ 11/04/26 12:12:18.015
    ------------------------------
    SNR Post Deployment tests Verify SNR CSV metadata [operator:snr, 70705, test_id:70705, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:olm]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:236
      [SKIPPED] in [It] - /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:241 @ 11/04/26 12:12:18.015
    S [SKIPPED] [0.000 seconds]
    SNR Post Deployment tests [It] Verify SNR CSV metadata [operator:snr, 70705, test_id:70705, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:olm]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:236
    
      [SKIPPED] SNR is a WAO operand on this run: there is no per-operand CSV to assert on, only the workload-availability-operator bundle
      In [It] at: /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/post_deployment.go:241 @ 11/04/26 12:12:18.015
    ------------------------------
    SNR Must-Gather Diagnostics Verify SNR must-gather collects diagnostic data [Serial, operator:snr, 50774, test_id:50774, disruption:nondestructive, tier:acceptance, platform:any, component:controller, frequency:weekly]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/must_gather.go:33
      STEP: Verifying SNR deployment is Ready @ 11/04/26 12:12:18.015
      STEP: Detecting cluster topology @ 11/04/26 12:12:18.139
      STEP: Resolving the RHWA must-gather image @ 11/04/26 12:12:18.214
      must-gather image using default: quay.io/medik8s/must-gather:latest
      STEP: Creating artifact directory for must-gather output @ 11/04/26 12:12:18.214
      STEP: Capturing cluster state before must-gather for validation @ 11/04/26 12:12:18.214
      STEP: Running oc adm must-gather @ 11/04/26 12:12:18.329
      Using must-gather image quay.io/medik8s/must-gather:latest (digest sha256:9d3dcb2ee24f8cc8c8c6fe288948fcb65c61605a7feb41df1cfc6b2b4c4f0f05)
      must-gather output saved to /tmp/ginkgo2731353922/snr-must-gather-803858318/oc-adm-must-gather.log
      STEP: Collecting gathered file paths @ 11/04/26 12:12:37.057
      STEP: Validating node YAMLs for all cluster nodes @ 11/04/26 12:12:37.059
      Node YAMLs collected: 6/6
      STEP: Validating SNR CRD definitions are present @ 11/04/26 12:12:37.059
      STEP: Validating SNR controller and agent pod data is collected @ 11/04/26 12:12:37.059
      SNR pod data collected: 8/8
      STEP: Cleaning up leftover must-gather namespaces @ 11/04/26 12:12:37.059
      Cleaning up leftover must-gather namespace: openshift-must-gather-lx7xv
    • [19.497 seconds]
    ------------------------------
    SSS
    ------------------------------
    SNR Unsupported Strategy tests Verify SNR with unsupported NodeDeletion strategy is rejected [operator:snr, 60877, test_id:60877, tier:acceptance, disruption:nondestructive, platform:any, frequency:presubmit, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/unsupported_strategy.go:41
      STEP: Verify SNR and SNRT CRDs exist @ 11/04/26 12:12:37.512
      STEP: Creating SNR with NodeDeletion remediationStrategy @ 11/04/26 12:12:37.624
    • [0.158 seconds]
    ------------------------------
    SNR Unsupported Strategy tests Verify SNRT with unsupported NodeDeletion strategy is rejected [operator:snr, 60822, test_id:60822, tier:acceptance, disruption:nondestructive, platform:any, frequency:presubmit, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/unsupported_strategy.go:63
      STEP: Verify SNR and SNRT CRDs exist @ 11/04/26 12:12:37.67
      STEP: Creating SelfNodeRemediationTemplate with NodeDeletion strategy @ 11/04/26 12:12:37.753
    • [0.136 seconds]
    ------------------------------
    SS
    ------------------------------
    SNR Processing Condition tests when SNR has nhc-timed-out annotation Verify SNR conditions with nhc-timed-out annotation [operator:snr, 60881, test_id:60881, tier:acceptance, disruption:nondestructive, platform:any, frequency:weekly, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/processing_conditions.go:55
      STEP: Verify SNR deployment is ready @ 11/04/26 12:12:37.806
      STEP: Creating SNR with nhc-timed-out annotation @ 11/04/26 12:12:37.913
      STEP: Waiting for Processing and Succeeded conditions to reflect NHC timed-out state @ 11/04/26 12:12:37.97
    • [0.253 seconds]
    ------------------------------
    SNR Processing Condition tests when SNR targets a non-existent node Verify SNR conditions with non-existent node name [operator:snr, 70584, test_id:70584, tier:acceptance, disruption:nondestructive, platform:any, frequency:weekly, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/processing_conditions.go:105
      STEP: Verifying test node name does not exist in the cluster @ 11/04/26 12:12:38.059
      STEP: Creating SNR with non-existent node name @ 11/04/26 12:12:38.148
      STEP: Waiting for Processing and Succeeded conditions to reflect node-not-found state @ 11/04/26 12:12:38.199
    • [5.293 seconds]
    ------------------------------
    SNR NetworkPolicy tests Verify SNR manages the agent DaemonSet NetworkPolicy [operator:snr, 1645, test_id:1645, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:network-policy]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/network_policy.go:70
      STEP: Verifying the default SelfNodeRemediationConfig is ready @ 11/04/26 12:12:43.353
      STEP: Verifying the NetworkPolicy self-node-remediation-ds-np exists for the default SelfNodeRemediationConfig @ 11/04/26 12:12:43.398
      STEP: Verifying the NetworkPolicy is owned by the SelfNodeRemediationConfig CR @ 11/04/26 12:12:43.476
      STEP: Verifying the NetworkPolicy's static ingress and egress rules @ 11/04/26 12:12:43.476
      STEP: Deleting the NetworkPolicy and verifying the operator recreates it @ 11/04/26 12:12:43.476
      STEP: Setting EndpointHealthCheckUrl and verifying the egress ipBlock rule resolves to its IP @ 11/04/26 12:12:48.628
      STEP: Verifying the four static egress rules survive alongside the new ipBlock rule @ 11/04/26 12:12:48.734
      STEP: Simulating a DNS flip and verifying the egress ipBlock rule updates to the new IP @ 11/04/26 12:12:48.776
      STEP: Validating NetworkPolicy stability under rapid EndpointHealthCheckUrl changes (race test) @ 11/04/26 12:12:53.922
      STEP: AfterAll: restoring original EndpointHealthCheckUrl on the default SNRC @ 11/04/26 12:13:29.294
    • [45.993 seconds]
    ------------------------------
    SNR CRD and Negative Validation tests Verify CRD description of safeTimeToAssumeNodeRebootedSeconds [operator:snr, 60824, test_id:60824, tier:smoke, disruption:nondestructive, platform:any, frequency:presubmit, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/crd_negative.go:42
      STEP: Verify SNR admission webhook is ready before running webhook-dependent tests @ 11/04/26 12:13:29.346
      STEP: Getting SelfNodeRemediationConfig CRD @ 11/04/26 12:13:29.496
      STEP: Extracting safeTimeToAssumeNodeRebootedSeconds description from storage version @ 11/04/26 12:13:29.539
    • [0.194 seconds]
    ------------------------------
    SNR CRD and Negative Validation tests Verify non-default SNRC creation is rejected [operator:snr, 50961, test_id:50961, tier:acceptance, disruption:nondestructive, platform:any, frequency:presubmit, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/crd_negative.go:81
      STEP: Attempting to create a non-default SelfNodeRemediationConfig @ 11/04/26 12:13:29.54
    • [0.048 seconds]
    ------------------------------
    SNR CRD and Negative Validation tests Verify invalid values in SNRC are rejected [operator:snr, 47330, test_id:47330, tier:acceptance, disruption:nondestructive, platform:any, frequency:presubmit, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/crd_negative.go:101
      STEP: Creating SNRC with invalid string duration values @ 11/04/26 12:13:29.587
      STEP: Creating SNRC with too-small duration values @ 11/04/26 12:13:29.626
    • [0.075 seconds]
    ------------------------------
    SNR CRD and Negative Validation tests Verify lastError is captured for non-existent node [operator:snr, 50583, test_id:50583, tier:acceptance, disruption:nondestructive, platform:any, frequency:presubmit, component:controller]
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/tests/crd_negative.go:170
      STEP: Verifying test node name does not exist in the cluster @ 11/04/26 12:13:29.662
      STEP: Creating SNR with non-existent node name @ 11/04/26 12:13:29.702
      STEP: Verifying lastError field is populated @ 11/04/26 12:13:29.749
    • [0.183 seconds]
    ------------------------------
    SSSSSS
    ------------------------------
    [AfterSuite] 
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/snr_suite_test.go:72
      STEP: Reporting the state the SNR operand ended the run in @ 11/04/26 12:13:29.846
      AfterSuite: operand selfNodeRemediation phase=Available (left enabled on purpose)
      AfterSuite: operand selfNodeRemediation running=true (self-node-remediation-controller-manager 2/2)
      STEP: Sweeping up SelfNodeRemediation CRs the suite left behind @ 11/04/26 12:13:29.982
    [AfterSuite] PASSED [0.178 seconds]
    ------------------------------
    [ReportAfterSuite] 
    /home/whayutin/OPENSHIFT/git/MEDIK8S/rhwa-system-tests/tests/snr-operator/snr_suite_test.go:171
    [ReportAfterSuite] PASSED [0.005 seconds]
    ------------------------------
    [ReportAfterSuite] Autogenerated ReportAfterSuite for --junit-report
    autogenerated by Ginkgo
    [ReportAfterSuite] PASSED [0.001 seconds]
    ------------------------------
    
    Ran 13 of 26 Specs in 73.089 seconds
    SUCCESS! -- 13 Passed | 0 Failed | 0 Pending | 13 Skipped
    PASS
    
    Ginkgo ran 1 suite in 1m14.22763358s
    Test Suite Passed
    whayutin@whayutin-thinkpadp1gen7:~/OPENSHIFT/git/MEDIK8S/rhwa-system-tests$ 
    

    abrugaro abrugaro commented on code on Nov 06, 2026 11:14 UTC
    Code Review
    tests/snr-operator/tests/post_deployment.go:1
    @@ -347,3 +286,51 @@ var _ = Describe(
     					"SNR controller replicas not matching expected count")
     			})
     	})
    +
    +// requireSNRCSV returns the SNR ClusterServiceVersion for the specs that assert on operator
    +// packaging rather than on operand behaviour.
    +//
    +// Under the workload-availability-operator there is no per-operand CSV. WAO ships one bundle
    +// covering every operand, so a CSV named after SNR does not exist and its version, annotations
    +// and `replaces` chain describe packaging that no longer applies to the operand. Those specs
    +// skip on a WAO run rather than fail: they still carry their value on a cluster where SNR is
    +// installed as its own operator, and the operand's own behaviour is covered by the specs above,
    +// which read no CSV at all.
    +//
    +// The lookup lives here and not in BeforeAll so that it blocks only the two specs that need a
    +// CSV. Keeping it in the container's setup made every post-deployment spec wait five minutes
    +// for a CSV that was never coming.
    +func requireSNRCSV() *olm.ClusterServiceVersionBuilder {
    +	GinkgoHelper()
    +	suiteConfig, _ := GinkgoConfiguration()
    +	if helpers.WAORunRequested(suiteConfig.LabelFilter) {
    +		Skip("SNR is a WAO operand on this run: there is no per-operand CSV to assert on, " +
    +			"only the workload-availability-operator bundle")
    +	}

    We were excluding this check in upstream testing as well, as the images built from main may not have the correct CSV.

    if !helpers.IsDownstream() {
      Skip("CSV product annotations are absent when ECO_IS_DOWNSTREAM=false")
    }
    

    Reviewers
    Assignees
    weshayutin weshayutin
    Labels
    risk: low confidence: 83.3% 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: 85.5% (HIGH) · Higher = larger blast radius
    85.5%
    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: 83.3% · Lower = rushed or shallow review
    83.3%
    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: 14.3% · Safe to merge
    14.3%