Skip to content

Commit bae2463

Browse files
Merge pull request #24352 from bandrade/ocp-24829
[AUTO][OLM][OCP-24829] Report `Upgradeable` in OLM ClusterOperators status
2 parents f6452df + ac53e6c commit bae2463

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

test/extended/operators/olm.go

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ package operators
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/google/go-github/github"
78
g "github.com/onsi/ginkgo"
89
o "github.com/onsi/gomega"
910

10-
exutil "github.com/openshift/origin/test/extended/util"
11-
"k8s.io/apimachinery/pkg/util/wait"
12-
e2e "k8s.io/kubernetes/test/e2e/framework"
1311
"path/filepath"
1412
"strings"
1513
"time"
14+
15+
exutil "github.com/openshift/origin/test/extended/util"
16+
"k8s.io/apimachinery/pkg/util/wait"
17+
e2e "k8s.io/kubernetes/test/e2e/framework"
1618
)
1719

1820
var _ = g.Describe("[Feature:Platform] OLM should", func() {
@@ -209,4 +211,19 @@ var _ = g.Describe("[Feature:Platform] an end user use OLM", func() {
209211
o.Expect(err).NotTo(o.HaveOccurred())
210212
o.Expect(output).To(o.ContainSubstring(etcdClusterName))
211213
})
214+
215+
// OCP-24829 - Report `Upgradeable` in OLM ClusterOperators status
216+
// author: [email protected]
217+
g.It("Report Upgradeable in OLM ClusterOperators status", func() {
218+
olmCOs := []string{"operator-lifecycle-manager", "operator-lifecycle-manager-catalog", "operator-lifecycle-manager-packageserver"}
219+
for _, co := range olmCOs {
220+
msg, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("co", co, "-o=jsonpath={range .status.conditions[*]}{.type}{' '}{.status}").Output()
221+
if err != nil {
222+
e2e.Failf("Unable to get co %s status, error:%v", msg, err)
223+
}
224+
o.Expect(err).NotTo(o.HaveOccurred())
225+
o.Expect(msg).To(o.ContainSubstring("Upgradeable True"))
226+
}
227+
228+
})
212229
})

0 commit comments

Comments
 (0)