Skip to content

Conversation

@rohanKanojia
Copy link
Member

What does this PR do?

Extracted from #1504

Moved this test to a separate PR as it doesn't relate to changes in #1504 .

In response to #1504 (comment) , I just wanted to check if we will be getting the same failures as the che-operator is getting due to the controller-runtime upgrade by writing a unit test for List operator using fake client.

Note: It turns out that che-operator logic depended on the presence of TypeMeta, which was causing problems.

  • Added table-driven tests for the PullSecrets function pull_secret.go
  • Used fake Kubernetes client and runtime scheme setup for isolated testing

What issues does this PR fix or reference?

N/A

Is it tested? How?

Changes include only a unit test, build passing should verify it's working as expected.

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

+ Added table-driven tests for the PullSecrets function
+ Used fake Kubernetes client and runtime scheme setup for isolated testing

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Sep 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akurinnoy, dkwon17, rohanKanojia

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dkwon17 dkwon17 merged commit fabc249 into devfile:main Sep 30, 2025
11 checks passed
@rohanKanojia rohanKanojia deleted the pr/test-pull-secret branch October 1, 2025 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants