Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions openshift/tests-extension/test/qe/specs/olmv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] cluster-olm-operator", g.Label("NonHyp

g.By("2) check metrics are collected")
queryUrl := "http://localhost:9090/api/v1/query"
query1 := `query=catalogd_http_request_duration_seconds_count{code="200"}`
query1 := `query=rest_client_requests_total{namespace="openshift-catalogd"}`
queryResult1, _ := oc.AsAdmin().WithoutNamespace().Run("exec").Args("-n", "openshift-monitoring", k8sPodname, "--", "curl", "-G", "--data-urlencode", query1, queryUrl).Output()
e2e.Logf("query result 1: %s", queryResult1)
e2e.Logf("catalogd rest_client_requests_total query result: %s", queryResult1)
o.Expect(queryResult1).To(o.ContainSubstring("value"))

query2 := `query=controller_runtime_reconcile_total{controller="controller-operator-cluster-extension-controller",result="success"}`
query2 := `query=rest_client_requests_total{namespace="openshift-operator-controller"}`
queryResult2, _ := oc.AsAdmin().WithoutNamespace().Run("exec").Args("-n", "openshift-monitoring", k8sPodname, "--", "curl", "-G", "--data-urlencode", query2, queryUrl).Output()
e2e.Logf("query result 2: %s", queryResult2)
e2e.Logf("operator-controller rest_client_requests_total query result: %s", queryResult2)
o.Expect(queryResult2).To(o.ContainSubstring("value"))

g.By("3) test SUCCESS")
Expand Down
44 changes: 40 additions & 4 deletions openshift/tests-extension/test/qe/specs/olmv1_ce.go
Original file line number Diff line number Diff line change
Expand Up @@ -2398,8 +2398,16 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
clusterextension.Create(oc)
o.Expect(clusterextension.InstalledBundle).To(o.ContainSubstring("v0.0.1"))
status, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}`)
if !strings.Contains(status, "True") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected status to be True, but got: %s. Full status: %s", status, fullStatus)
}
o.Expect(status).To(o.ContainSubstring("True"))
message, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].message}`)
if !strings.Contains(message, "All is well") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected message to contain 'All is well', but got: %s. Full status: %s", message, fullStatus)
}
o.Expect(message).To(o.ContainSubstring("All is well"))

g.By("3) upgrade clusterextension to 1.1.0, olm.maxOpenShiftVersion is 4.19")
Expand All @@ -2413,9 +2421,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
return false, nil
})
status, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}`)
if !strings.Contains(status, "False") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected status to be False, but got: %s. Full status: %s", status, fullStatus)
}
o.Expect(status).To(o.ContainSubstring("False"))
if errWait != nil {
_, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status.conditions}")
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Upgradeable message is not correct. Full status: %s", fullStatus)
}
exutil.AssertWaitPollNoErr(errWait, "Upgradeable message is not correct")

Expand All @@ -2430,9 +2443,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
return false, nil
})
status, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}`)
if !strings.Contains(status, "False") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected status to be False, but got: %s. Full status: %s", status, fullStatus)
}
o.Expect(status).To(o.ContainSubstring("False"))
if errWait != nil {
_, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status.conditions}")
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Upgradeable message is not correct. Full status: %s", fullStatus)
}
exutil.AssertWaitPollNoErr(errWait, "Upgradeable message is not correct")
})
Expand Down Expand Up @@ -2490,8 +2508,16 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
clusterextension.Create(oc)
o.Expect(clusterextension.InstalledBundle).To(o.ContainSubstring("v0.0.1"))
status, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}`)
if !strings.Contains(status, "True") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected status to be True, but got: %s. Full status: %s", status, fullStatus)
}
o.Expect(status).To(o.ContainSubstring("True"))
message, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].message}`)
if !strings.Contains(message, "All is well") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected message to contain 'All is well', but got: %s. Full status: %s", message, fullStatus)
}
o.Expect(message).To(o.ContainSubstring("All is well"))

g.By("3) upgrade clusterextension to 1.2.0, olm.maxOpenShiftVersion is 4.20")
Expand All @@ -2505,9 +2531,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
return false, nil
})
status, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}`)
if !strings.Contains(status, "False") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected status to be False, but got: %s. Full status: %s", status, fullStatus)
}
o.Expect(status).To(o.ContainSubstring("False"))
if errWait != nil {
_, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status.conditions}")
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Upgradeable message is not correct. Full status: %s", fullStatus)
}
exutil.AssertWaitPollNoErr(errWait, "Upgradeable message is not correct")

Expand All @@ -2522,9 +2553,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
return false, nil
})
status, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o", `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}`)
if !strings.Contains(status, "False") {
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Expected status to be False, but got: %s. Full status: %s", status, fullStatus)
}
o.Expect(status).To(o.ContainSubstring("False"))
if errWait != nil {
_, _ = olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status.conditions}")
fullStatus, _ := olmv1util.GetNoEmpty(oc, "co", "olm", "-o=jsonpath-as-json={.status}")
e2e.Logf("Upgradeable message is not correct. Full status: %s", fullStatus)
}
exutil.AssertWaitPollNoErr(errWait, "Upgradeable message is not correct")

Expand Down