@@ -28,7 +28,6 @@ import (
28
28
. "github.com/onsi/ginkgo/v2"
29
29
. "github.com/onsi/gomega"
30
30
"github.com/onsi/gomega/types"
31
- operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
32
31
"github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture"
33
32
argocdFixture "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/argocd"
34
33
fixtureUtils "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/utils"
@@ -38,9 +37,11 @@ import (
38
37
"sigs.k8s.io/controller-runtime/pkg/client"
39
38
)
40
39
41
- // MustGatherImage is a good place to insert development image
42
- // Known to be buggy in 1.17.0
43
- const MustGatherImage = "registry.redhat.io/openshift-gitops-1/must-gather-rhel8:v1.16.0" // TODO, use tag name with SUT version
40
+ // default used when E2E_MUST_GATHER_IMAGE is not set.
41
+ // CI images:
42
+ // - quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/gitops-must-gather:on-pr-<GIT_COMMIT_SHA>
43
+ // - quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/gitops-must-gather:<GIT_COMMIT_SHA>
44
+ const defaultMustGatherImage = "quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/gitops-must-gather:latest"
44
45
45
46
var _ = Describe ("GitOps Operator Parallel E2E Tests" , func () {
46
47
@@ -58,7 +59,6 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
58
59
})
59
60
60
61
It ("verified the files collected for must gather are valid" , func () {
61
-
62
62
By ("creating namespace-scoped Argo CD instance" )
63
63
ns , nsCleanup := fixture .CreateRandomE2ETestNamespaceWithCleanupFunc ()
64
64
defer nsCleanup ()
@@ -114,7 +114,7 @@ func gather() string {
114
114
115
115
stdout , err := osFixture .ExecCommandWithOutputParam (
116
116
true ,
117
- "oc" , "adm" , "must-gather" , "--image" , MustGatherImage , "--dest-dir" , destDir ,
117
+ "oc" , "adm" , "must-gather" , "--image" , mustGatherImage () , "--dest-dir" , destDir ,
118
118
)
119
119
Expect (err ).ToNot (HaveOccurred ())
120
120
@@ -144,17 +144,12 @@ func resourcesDir(destDir string) string {
144
144
return path .Join (destDir , subdirs [0 ])
145
145
}
146
146
147
- func isCSVInstalled (ctx context.Context , k8sClient client.Client , subscription * operatorsv1alpha1.Subscription ) bool {
148
- key := client.ObjectKey {
149
- Name : subscription .Name ,
150
- Namespace : subscription .Namespace ,
151
- }
152
-
153
- if err := k8sClient .Get (ctx , key , subscription ); err != nil {
154
- return false
147
+ func mustGatherImage () string {
148
+ injected := os .Getenv ("E2E_MUST_GATHER_IMAGE" )
149
+ if injected == "" {
150
+ return defaultMustGatherImage
155
151
}
156
-
157
- return subscription .Status .InstalledCSV != ""
152
+ return injected
158
153
}
159
154
160
155
// BeValidResourceFile checks if the file exists and if it is a valid YAML file.
0 commit comments