Skip to content

Commit c42fde3

Browse files
committed
1 parent ed0e293 commit c42fde3

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

pkg/monitortests/cli/adm_upgrade/status/controlplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
var (
13-
operatorFirstLinePattern = regexp.MustCompile(`^\S+\s+\S+\s+\S+\s+.*$`)
13+
operatorFirstLinePattern = regexp.MustCompile(`^\S+\s+\S+\s+\S+(\s+.*)?$`)
1414
)
1515

1616
func (w *monitor) controlPlane() *junitapi.JUnitTestCase {

pkg/monitortests/cli/adm_upgrade/status/controlplane_test.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,28 @@ ip-10-0-64-121.ec2.internal Outdated Pending 4.20.0-0.ci-2025-08-13-1748
134134
SINCE LEVEL IMPACT MESSAGE
135135
24m12s Info None Update is proceeding well`
136136

137+
var operatorsWithEmptyMessage = `Unable to fetch alerts, ignoring alerts in 'Update Health': failed to get alerts from Thanos: no token is currently in use for this session
138+
= Control Plane =
139+
Assessment: Progressing
140+
Target Version: 4.20.0-0.ci-2025-08-26-154705-test-ci-op-jy9dt0lx-latest (from 4.20.0-0.ci-2025-08-26-145530-test-ci-op-jy9dt0lx-initial)
141+
Updating: authentication
142+
Completion: 9% (3 operators updated, 1 updating, 30 waiting)
143+
Duration: 7m27s (Est. Time Remaining: 36m)
144+
Operator Health: 32 Healthy, 1 Unavailable, 1 Available but degraded
145+
146+
Updating Cluster Operators
147+
NAME SINCE REASON MESSAGE
148+
authentication 58s WellKnownReadyCon...
149+
150+
Control Plane Nodes
151+
NAME ASSESSMENT PHASE VERSION EST MESSAGE
152+
ip-10-0-35-68.us-east-2.compute.internal Outdated Pending 4.20.0-0.ci-2025-08-26-145530-test-ci-op-jy9dt0lx-initial ?
153+
154+
= Update Health =
155+
SINCE LEVEL IMPACT MESSAGE
156+
7m27s Info None Update is proceeding well
157+
`
158+
137159
var controlPlaneCompleted = `Unable to fetch alerts, ignoring alerts in 'Update Health': failed to get alerts from Thanos: no token is currently in use for this session
138160
= Control Plane =
139161
Update to 4.20.0-0.ci-2025-08-13-182454-test-ci-op-5wilvz46-latest successfully completed at 2025-08-13T20:33:32Z (duration: 59m)
@@ -236,6 +258,15 @@ func TestMonitor_ControlPlane(t *testing.T) {
236258
Name: "[sig-cli][OCPFeatureGate:UpgradeStatus] oc adm upgrade status control plane section is consistent",
237259
},
238260
},
261+
{
262+
name: "operators section with empty message",
263+
snapshots: []snapshot{
264+
{when: time.Now(), out: operatorsWithEmptyMessage},
265+
},
266+
expected: &junitapi.JUnitTestCase{
267+
Name: "[sig-cli][OCPFeatureGate:UpgradeStatus] oc adm upgrade status control plane section is consistent",
268+
},
269+
},
239270
{
240271
name: "control plane completed",
241272
snapshots: []snapshot{

0 commit comments

Comments
 (0)