Skip to content

OPRUN-4055: Migrate tasks from openshift/origin olmv1.go file which are remaining#418

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
camilamacedo86:add-catalog-olmv1-tests
Aug 8, 2025
Merged

OPRUN-4055: Migrate tasks from openshift/origin olmv1.go file which are remaining#418
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
camilamacedo86:add-catalog-olmv1-tests

Conversation

@camilamacedo86
Copy link
Copy Markdown
Contributor

@camilamacedo86 camilamacedo86 commented Jul 31, 2025

This commit moves the final OLMv1 tests from openshift/origin/test/extended/olm/olmv1.go to their proper location in this repository. This migration is part of a larger effort to streamline development by co-locating tests with the component they validate. This will reduce CI overhead and allow for faster, more atomic changes. See: https://github.com/openshift/origin/blob/05eeb94cf14384be99323b2cbd00ab61b1b1c47c/test/extended/olm/olmv1.go#L34-L285

Here is the PR to delete the tests when this one get merged: openshift/origin#30072

Tests done locally

 $ ./bin/olmv1-tests-ext run-suite olmv1/all
  [INFO] [env] Using kubeconfig: /Users/camilam/.kube/cluster-bot.kubeconfig[INFO] [env] Cluster environment initialized (OpenShift: true)  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
  ===============================================================================================================
  Random Seed: 1754481894 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [sig-olmv1] OLMv1 should pass a trivial sanity check
  /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:25
  • [0.000 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 0.001 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
  ===============================================================================================================
  Random Seed: 1754481894 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension
  /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:70
    STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553
    STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22
  • [4.587 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 4.587 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
  ===============================================================================================================
  Random Seed: 1754481894 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed
  /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:33
    STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14
    STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269
  • [0.259 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 0.259 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
  ===============================================================================================================
  Random Seed: 1754481894 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension
  /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:96
    STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4
    STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798
    STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925
  • [1.062 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 1.063 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
  ===============================================================================================================
  Random Seed: 1754481894 - will randomize all specs

  Will run 1 of 1 specs
  ------------------------------
  [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed
  /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:130
    STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463
    STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868
    STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903
  • [9.019 seconds]
  ------------------------------

  Ran 1 of 1 Specs in 9.019 seconds
  SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
  {
    "name": "[sig-olmv1] OLMv1 should pass a trivial sanity check",
    "lifecycle": "blocking",
    "duration": 1,
    "startTime": "2025-08-06 12:04:55.551460 UTC",
    "endTime": "2025-08-06 12:04:55.552753 UTC",
    "result": "passed",
    "output": ""
  },
  {
    "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension",
    "lifecycle": "blocking",
    "duration": 4588,
    "startTime": "2025-08-06 12:04:55.551500 UTC",
    "endTime": "2025-08-06 12:05:00.140437 UTC",
    "result": "passed",
    "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553\n  STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22\n"
  },
  {
    "name": "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed",
    "lifecycle": "blocking",
    "duration": 4848,
    "startTime": "2025-08-06 12:04:55.551510 UTC",
    "endTime": "2025-08-06 12:05:00.400050 UTC",
    "result": "passed",
    "output": "  STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14\n  STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269\n"
  },
  {
    "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension",
    "lifecycle": "blocking",
    "duration": 5911,
    "startTime": "2025-08-06 12:04:55.551501 UTC",
    "endTime": "2025-08-06 12:05:01.462839 UTC",
    "result": "passed",
    "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4\n  STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798\n  STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925\n"
  },
  {
    "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed",
    "lifecycle": "blocking",
    "duration": 14930,
    "startTime": "2025-08-06 12:04:55.551500 UTC",
    "endTime": "2025-08-06 12:05:10.482061 UTC",
    "result": "passed",
    "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463\n  STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868\n  STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903\n"
  }
]

Assisted-by: Gemini

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 31, 2025
@openshift-ci openshift-ci Bot requested review from ankitathomas and tmshort July 31, 2025 19:36
@camilamacedo86 camilamacedo86 force-pushed the add-catalog-olmv1-tests branch 3 times, most recently from 8e3171e to 9a285e2 Compare August 6, 2025 12:09
@camilamacedo86 camilamacedo86 changed the title (WIP TEST) Migrate tests from openshift/origin olmv1.go remaning file Aug 6, 2025
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2025
@camilamacedo86 camilamacedo86 changed the title Migrate tests from openshift/origin olmv1.go remaning file Migrate tasks from openshift/origin olmv1.go file which are remaining Aug 6, 2025
@camilamacedo86 camilamacedo86 force-pushed the add-catalog-olmv1-tests branch from 9a285e2 to 209cf93 Compare August 6, 2025 12:13
@camilamacedo86 camilamacedo86 changed the title Migrate tasks from openshift/origin olmv1.go file which are remaining OPRUN-4055: Migrate tasks from openshift/origin olmv1.go file which are remaining Aug 6, 2025
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 6, 2025

@camilamacedo86: This pull request references OPRUN-4055 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

Details

In response to this:

Description

Migrate the remaining tests in olmv1.go file:

https://github.com/openshift/origin/blob/05eeb94cf14384be99323b2cbd00ab61b1b1c47c/test/extended/olm/olmv1.go#L34-L285

Tests done locally

$ ./bin/olmv1-tests-ext run-suite olmv1/all
 [INFO] [env] Using kubeconfig: /Users/camilam/.kube/cluster-bot.kubeconfig[INFO] [env] Cluster environment initialized (OpenShift: true)  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1] OLMv1 should pass a trivial sanity check
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:25
 • [0.000 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.001 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:70
   STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553
   STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22
 • [4.587 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 4.587 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:33
   STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14
   STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269
 • [0.259 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.259 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:96
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4
   STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798
   STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925
 • [1.062 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 1.063 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:130
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463
   STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868
   STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903
 • [9.019 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 9.019 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
 {
   "name": "[sig-olmv1] OLMv1 should pass a trivial sanity check",
   "lifecycle": "blocking",
   "duration": 1,
   "startTime": "2025-08-06 12:04:55.551460 UTC",
   "endTime": "2025-08-06 12:04:55.552753 UTC",
   "result": "passed",
   "output": ""
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension",
   "lifecycle": "blocking",
   "duration": 4588,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:00.140437 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553\n  STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed",
   "lifecycle": "blocking",
   "duration": 4848,
   "startTime": "2025-08-06 12:04:55.551510 UTC",
   "endTime": "2025-08-06 12:05:00.400050 UTC",
   "result": "passed",
   "output": "  STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14\n  STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension",
   "lifecycle": "blocking",
   "duration": 5911,
   "startTime": "2025-08-06 12:04:55.551501 UTC",
   "endTime": "2025-08-06 12:05:01.462839 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4\n  STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798\n  STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed",
   "lifecycle": "blocking",
   "duration": 14930,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:10.482061 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463\n  STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868\n  STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903\n"
 }
]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 6, 2025
@camilamacedo86 camilamacedo86 force-pushed the add-catalog-olmv1-tests branch 2 times, most recently from 503feae to afb35c0 Compare August 6, 2025 12:43
@camilamacedo86
Copy link
Copy Markdown
Contributor Author

c/c @kuiwang02

Copy link
Copy Markdown
Contributor

@anik120 anik120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me mostly. Two questions:

  1. We don't need to check in the vendor folder right? I understand the vendor folder was introduced in a previous PR and if we want to make any change to that structure we should do it in a separate PR, I just wanted to confirm the we don't need the folder to be checked into git for any reason. Openshift CI env has access to the internet and therefore the ability to pull the dependencies based on go.sum and go.mod
  2. Is the ci/prow/test-extensions running the exact tests being introduced in this PR? Or is there another new CI target that's running these extension tests?

@@ -0,0 +1,88 @@
package mocks
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this package called mocks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we have helpers to create the mocks/scenarios
Do you have a better name suggestion?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anik120

I changed to helpers. I hope that addresses your concern. 🚀

@camilamacedo86
Copy link
Copy Markdown
Contributor Author

camilamacedo86 commented Aug 6, 2025

HI @anik120

Thank you for looking on this one. Following the answers inline regards: #418 (review)

We don't need to check in the vendor folder right?

Yes, and we do. If we do not add the vendor properly, it fails in the ci job ci/prow/verify-deps

Is the ci/prow/test-extensions running the exact tests being introduced in this PR? Or is there another new CI target that's running these extension tests?

We can look here what it does:

https://github.com/openshift/release/blob/02b99311f375e890f5a9c1961d6b4e280f35b4ab/ci-operator/config/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main.yaml#L169-L182

This one is more of a sanity check
(validates build, lint, go vet, go mod tidy and ensures that we properly tracked the TestIDs in the metadata)

Now, the tests are executed under:

https://github.com/openshift/release/blob/02b99311f375e890f5a9c1961d6b4e280f35b4ab/ci-operator/config/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main.yaml#L183-L192

How it works can be found in the README: https://github.com/openshift/operator-framework-operator-controller/blob/main/openshift/tests-extension/README.md#e2e-test-configuration

@camilamacedo86 camilamacedo86 requested a review from anik120 August 6, 2025 17:51
"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 6, 2025

@camilamacedo86: This pull request references OPRUN-4055 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

Details

In response to this:

Description

Migrate the remaining tests in olmv1.go file:

https://github.com/openshift/origin/blob/05eeb94cf14384be99323b2cbd00ab61b1b1c47c/test/extended/olm/olmv1.go#L34-L285

Tests done locally

$ ./bin/olmv1-tests-ext run-suite olmv1/all
 [INFO] [env] Using kubeconfig: /Users/camilam/.kube/cluster-bot.kubeconfig[INFO] [env] Cluster environment initialized (OpenShift: true)  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1] OLMv1 should pass a trivial sanity check
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:25
 • [0.000 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.001 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:70
   STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553
   STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22
 • [4.587 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 4.587 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:33
   STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14
   STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269
 • [0.259 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.259 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:96
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4
   STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798
   STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925
 • [1.062 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 1.063 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:130
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463
   STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868
   STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903
 • [9.019 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 9.019 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
 {
   "name": "[sig-olmv1] OLMv1 should pass a trivial sanity check",
   "lifecycle": "blocking",
   "duration": 1,
   "startTime": "2025-08-06 12:04:55.551460 UTC",
   "endTime": "2025-08-06 12:04:55.552753 UTC",
   "result": "passed",
   "output": ""
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension",
   "lifecycle": "blocking",
   "duration": 4588,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:00.140437 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553\n  STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed",
   "lifecycle": "blocking",
   "duration": 4848,
   "startTime": "2025-08-06 12:04:55.551510 UTC",
   "endTime": "2025-08-06 12:05:00.400050 UTC",
   "result": "passed",
   "output": "  STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14\n  STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension",
   "lifecycle": "blocking",
   "duration": 5911,
   "startTime": "2025-08-06 12:04:55.551501 UTC",
   "endTime": "2025-08-06 12:05:01.462839 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4\n  STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798\n  STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed",
   "lifecycle": "blocking",
   "duration": 14930,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:10.482061 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463\n  STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868\n  STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903\n"
 }
]

Disclamer: Use AI to help validate the mock/generation

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@camilamacedo86 camilamacedo86 force-pushed the add-catalog-olmv1-tests branch from afb35c0 to edd0cbe Compare August 6, 2025 18:10
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 6, 2025

@camilamacedo86: The label(s) /label Assisted-by-IA cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, ux-approved, no-qe, downstream-change-needed, rebase/manual, cluster-config-api-changed, run-integration-tests, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, stability-fix-approved, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

Details

In response to this:

/label Assisted-by-IA

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 6, 2025

@camilamacedo86: This pull request references OPRUN-4055 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

Details

In response to this:

Description

Migrate the remaining tests in olmv1.go file:

https://github.com/openshift/origin/blob/05eeb94cf14384be99323b2cbd00ab61b1b1c47c/test/extended/olm/olmv1.go#L34-L285

Tests done locally

$ ./bin/olmv1-tests-ext run-suite olmv1/all
 [INFO] [env] Using kubeconfig: /Users/camilam/.kube/cluster-bot.kubeconfig[INFO] [env] Cluster environment initialized (OpenShift: true)  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1] OLMv1 should pass a trivial sanity check
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:25
 • [0.000 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.001 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:70
   STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553
   STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22
 • [4.587 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 4.587 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:33
   STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14
   STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269
 • [0.259 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.259 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:96
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4
   STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798
   STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925
 • [1.062 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 1.063 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:130
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463
   STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868
   STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903
 • [9.019 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 9.019 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
 {
   "name": "[sig-olmv1] OLMv1 should pass a trivial sanity check",
   "lifecycle": "blocking",
   "duration": 1,
   "startTime": "2025-08-06 12:04:55.551460 UTC",
   "endTime": "2025-08-06 12:04:55.552753 UTC",
   "result": "passed",
   "output": ""
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension",
   "lifecycle": "blocking",
   "duration": 4588,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:00.140437 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553\n  STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed",
   "lifecycle": "blocking",
   "duration": 4848,
   "startTime": "2025-08-06 12:04:55.551510 UTC",
   "endTime": "2025-08-06 12:05:00.400050 UTC",
   "result": "passed",
   "output": "  STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14\n  STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension",
   "lifecycle": "blocking",
   "duration": 5911,
   "startTime": "2025-08-06 12:04:55.551501 UTC",
   "endTime": "2025-08-06 12:05:01.462839 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4\n  STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798\n  STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed",
   "lifecycle": "blocking",
   "duration": 14930,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:10.482061 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463\n  STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868\n  STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903\n"
 }
]

Disclaimer: Assisted-by: Gemini

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 6, 2025

@camilamacedo86: This pull request references OPRUN-4055 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

Details

In response to this:

This commit moves the final OLMv1 tests from openshift/origin/test/extended/olm/olmv1.go to their proper location in this repository. This migration is part of a larger effort to streamline development by co-locating tests with the component they validate. This will reduce CI overhead and allow for faster, more atomic changes. See: https://github.com/openshift/origin/blob/05eeb94cf14384be99323b2cbd00ab61b1b1c47c/test/extended/olm/olmv1.go#L34-L285

Tests done locally

$ ./bin/olmv1-tests-ext run-suite olmv1/all
 [INFO] [env] Using kubeconfig: /Users/camilam/.kube/cluster-bot.kubeconfig[INFO] [env] Cluster environment initialized (OpenShift: true)  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1] OLMv1 should pass a trivial sanity check
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:25
 • [0.000 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.001 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:70
   STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553
   STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22
 • [4.587 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 4.587 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:33
   STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14
   STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269
 • [0.259 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.259 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:96
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4
   STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798
   STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925
 • [1.062 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 1.063 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:130
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463
   STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868
   STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903
 • [9.019 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 9.019 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
 {
   "name": "[sig-olmv1] OLMv1 should pass a trivial sanity check",
   "lifecycle": "blocking",
   "duration": 1,
   "startTime": "2025-08-06 12:04:55.551460 UTC",
   "endTime": "2025-08-06 12:04:55.552753 UTC",
   "result": "passed",
   "output": ""
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension",
   "lifecycle": "blocking",
   "duration": 4588,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:00.140437 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553\n  STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed",
   "lifecycle": "blocking",
   "duration": 4848,
   "startTime": "2025-08-06 12:04:55.551510 UTC",
   "endTime": "2025-08-06 12:05:00.400050 UTC",
   "result": "passed",
   "output": "  STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14\n  STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension",
   "lifecycle": "blocking",
   "duration": 5911,
   "startTime": "2025-08-06 12:04:55.551501 UTC",
   "endTime": "2025-08-06 12:05:01.462839 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4\n  STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798\n  STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed",
   "lifecycle": "blocking",
   "duration": 14930,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:10.482061 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463\n  STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868\n  STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903\n"
 }
]

Assisted-by: Gemini

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@camilamacedo86
Copy link
Copy Markdown
Contributor Author

/test openshift-e2e-aws

Comment thread openshift/tests-extension/cmd/main.go Outdated
specs.AddBeforeAll(func() {
env.Init()
// Ensure that OLMv1 is enabled
commons.CheckFeatureCapability()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@camilamacedo86
each case needs to check feature capability to determine if it skip.
if you put it here, only one case check it. and other cases do not check it.

so, it needs to be in each Describe with BeforeEach. for example

var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs", func() {
	const olmv1GroupName = "olm.operatorframework.io"
	BeforeEach(func() {
		commons.CheckFeatureCapability()
	})
	It("should be installed", func(ctx SpecContext) {

and

var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation", func() {
	BeforeEach(func() {
		commons.CheckFeatureCapability()
	})
	It("should install a cluster extension", func(ctx SpecContext) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought all would check that.
It is fine we can keep in all of them

extlogs.Warn("Skipping feature capability check: not OpenShift")
return
}
var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation", func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please refer to #418 (comment)

@@ -30,8 +30,8 @@ var _ = Describe("[sig-olmv1] OLMv1", func() {
})

var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs", func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please refer to #418 (comment)

@camilamacedo86 camilamacedo86 force-pushed the add-catalog-olmv1-tests branch 2 times, most recently from b0f23a7 to b7ad3df Compare August 7, 2025 11:45
… which are remaining

This commit moves the final OLMv1 tests from openshift/origin/test/extended/olm/olmv1.go to their proper location in this repository. This migration is part of a larger effort to streamline development by co-locating tests with the component they validate. This will reduce CI overhead and allow for faster, more atomic changes.

Assisted-by: Gemini
@camilamacedo86 camilamacedo86 force-pushed the add-catalog-olmv1-tests branch from b7ad3df to a185061 Compare August 7, 2025 18:10
@camilamacedo86
Copy link
Copy Markdown
Contributor Author

Hi @kuiwang02

I appreciate your help.
All addressed, we need to add one test so we will have the vendor/refactor, etc, and then I can rebase with the other PRs to make it clearer.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Aug 7, 2025

@camilamacedo86: This pull request references OPRUN-4055 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

Details

In response to this:

This commit moves the final OLMv1 tests from openshift/origin/test/extended/olm/olmv1.go to their proper location in this repository. This migration is part of a larger effort to streamline development by co-locating tests with the component they validate. This will reduce CI overhead and allow for faster, more atomic changes. See: https://github.com/openshift/origin/blob/05eeb94cf14384be99323b2cbd00ab61b1b1c47c/test/extended/olm/olmv1.go#L34-L285

Here is the PR to delete the tests when this one get merged: openshift/origin#30072

Tests done locally

$ ./bin/olmv1-tests-ext run-suite olmv1/all
 [INFO] [env] Using kubeconfig: /Users/camilam/.kube/cluster-bot.kubeconfig[INFO] [env] Cluster environment initialized (OpenShift: true)  Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1] OLMv1 should pass a trivial sanity check
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:25
 • [0.000 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.001 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:70
   STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553
   STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22
 • [4.587 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 4.587 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:33
   STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14
   STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269
 • [0.259 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 0.259 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:96
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4
   STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798
   STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925
 • [1.062 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 1.063 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
 Running Suite:  - /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension
 ===============================================================================================================
 Random Seed: 1754481894 - will randomize all specs

 Will run 1 of 1 specs
 ------------------------------
 [sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed
 /Users/camilam/go/src/github/operator-framework-operator-controller/openshift/tests-extension/test/olmv1.go:130
   STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463
   STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868
   STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903
 • [9.019 seconds]
 ------------------------------

 Ran 1 of 1 Specs in 9.019 seconds
 SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
[
 {
   "name": "[sig-olmv1] OLMv1 should pass a trivial sanity check",
   "lifecycle": "blocking",
   "duration": 1,
   "startTime": "2025-08-06 12:04:55.551460 UTC",
   "endTime": "2025-08-06 12:04:55.552753 UTC",
   "result": "passed",
   "output": ""
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should install a cluster extension",
   "lifecycle": "blocking",
   "duration": 4588,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:00.140437 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:04:55.553\n  STEP: waiting for the quay-operator ClusterExtension to be installed @ 08/06/25 13:04:56.22\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 CRDs should be installed",
   "lifecycle": "blocking",
   "duration": 4848,
   "startTime": "2025-08-06 12:04:55.551510 UTC",
   "endTime": "2025-08-06 12:05:00.400050 UTC",
   "result": "passed",
   "output": "  STEP: verifying CRD clusterextensions.olm.operatorframework.io @ 08/06/25 13:05:00.14\n  STEP: verifying CRD clustercatalogs.olm.operatorframework.io @ 08/06/25 13:05:00.269\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should fail to install a non-existing cluster extension",
   "lifecycle": "blocking",
   "duration": 5911,
   "startTime": "2025-08-06 12:04:55.551501 UTC",
   "endTime": "2025-08-06 12:05:01.462839 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:00.4\n  STEP: waiting for the ClusterExtension to exist @ 08/06/25 13:05:00.798\n  STEP: waiting up to 2 minutes for ClusterExtension to report failure @ 08/06/25 13:05:00.925\n"
 },
 {
   "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed",
   "lifecycle": "blocking",
   "duration": 14930,
   "startTime": "2025-08-06 12:04:55.551500 UTC",
   "endTime": "2025-08-06 12:05:10.482061 UTC",
   "result": "passed",
   "output": "  STEP: applying the ClusterExtension resource @ 08/06/25 13:05:01.463\n  STEP: waiting for the function-mesh ClusterExtension to be installed @ 08/06/25 13:05:01.868\n  STEP: ensuring the cluster is not upgradeable when olm.maxopenshiftversion is specified @ 08/06/25 13:05:09.903\n"
 }
]

Assisted-by: Gemini

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Copy Markdown
Contributor

@anik120 anik120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2025
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 7, 2025

@camilamacedo86: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn a185061 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@kuiwang02
Copy link
Copy Markdown
Contributor

/lgtm

@kuiwang02
Copy link
Copy Markdown
Contributor

/approve

1 similar comment
@tmshort
Copy link
Copy Markdown
Contributor

tmshort commented Aug 8, 2025

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anik120, camilamacedo86, kuiwang02, tmshort

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 8, 2025
@openshift-merge-bot openshift-merge-bot Bot merged commit af40962 into openshift:main Aug 8, 2025
12 of 13 checks passed
@camilamacedo86 camilamacedo86 deleted the add-catalog-olmv1-tests branch August 8, 2025 13:13
@openshift-bot
Copy link
Copy Markdown

[ART PR BUILD NOTIFIER]

Distgit: ose-olm-catalogd
This PR has been included in build ose-olm-catalogd-container-v4.20.0-202508081443.p0.gaf40962.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Copy Markdown

[ART PR BUILD NOTIFIER]

Distgit: ose-olm-operator-controller
This PR has been included in build ose-olm-operator-controller-container-v4.20.0-202508081443.p0.gaf40962.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants