Skip to content

Commit

Permalink
[AUTO][OLM][OCP-24829] Report Upgradeable in OLM ClusterOperators s…
Browse files Browse the repository at this point in the history
…tatus
  • Loading branch information
Bruno Dias committed Jan 13, 2020
1 parent d32cd9d commit 8749ebb
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions test/extended/operators/olm.go
Expand Up @@ -2,14 +2,15 @@ package operators

import (
"fmt"
"path/filepath"
"strings"
"time"

g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"
exutil "github.com/openshift/origin/test/extended/util"
"k8s.io/apimachinery/pkg/util/wait"
e2e "k8s.io/kubernetes/test/e2e/framework"
"path/filepath"
"strings"
"time"
)

var _ = g.Describe("[Feature:Platform] OLM should", func() {
Expand Down Expand Up @@ -168,4 +169,19 @@ var _ = g.Describe("[Feature:Platform] an end user use OLM", func() {
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(output).To(o.ContainSubstring(etcdClusterName))
})

// OCP-24829 - Report `Upgradeable` in OLM ClusterOperators status
// author: bandrade@redhat.com
g.It("Report Upgradeable in OLM ClusterOperators status", func() {
olmCOs := []string{"operator-lifecycle-manager", "operator-lifecycle-manager-catalog", "operator-lifecycle-manager-packageserver"}
for _, co := range olmCOs {
msg, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("co", co, "-o=jsonpath={range .status.conditions[*]}{.type}{' '}{.status}").Output()
if err != nil {
e2e.Failf("Unable to get co %s status, error:%v", msg, err)
}
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(msg).To(o.ContainSubstring("Upgradeable True"))
}

})
})

0 comments on commit 8749ebb

Please sign in to comment.