Skip to content

Commit 76fcc37

Browse files
committed
upgrade status CLI monitortest: fix controlPlane check
Fixed a typo in a condition, for "nodes are not updated" we need to test `!cp.NodesUpdated`
1 parent 3f71eec commit 76fcc37

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-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
@@ -60,7 +60,7 @@ func (w *monitor) controlPlane() *junitapi.JUnitTestCase {
6060
"Control plane is reported updated but summary section is present": cp.Summary != nil,
6161
"Control plane is reported updated but operators section is present": cp.Operators != nil,
6262
"Control plane is reported updated but nodes section is present": cp.Nodes != nil,
63-
"Control plane is reported updated but nodes are not updated": cp.NodesUpdated,
63+
"Control plane is reported updated but nodes are not updated": !cp.NodesUpdated,
6464
} {
6565
if condition {
6666
fail(message)

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

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

139+
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
140+
= Control Plane =
141+
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)
142+
143+
All control plane nodes successfully updated to 4.20.0-0.ci-2025-08-13-182454-test-ci-op-5wilvz46-latest
144+
145+
= Worker Upgrade =
146+
147+
WORKER POOL ASSESSMENT COMPLETION STATUS
148+
worker Completed 100% (3/3) 3 Available, 0 Progressing, 0 Draining
149+
150+
Worker Pool Nodes: worker
151+
NAME ASSESSMENT PHASE VERSION EST MESSAGE
152+
ip-10-0-47-75.ec2.internal Completed Updated 4.20.0-0.ci-2025-08-13-182454-test-ci-op-5wilvz46-latest -
153+
ip-10-0-57-235.ec2.internal Completed Updated 4.20.0-0.ci-2025-08-13-182454-test-ci-op-5wilvz46-latest -
154+
ip-10-0-64-121.ec2.internal Completed Updated 4.20.0-0.ci-2025-08-13-182454-test-ci-op-5wilvz46-latest -
155+
156+
= Update Health =
157+
SINCE LEVEL IMPACT MESSAGE
158+
59m22s Info None Update is proceeding well`
159+
139160
func TestMonitor_ControlPlane(t *testing.T) {
140161
t.Parallel()
141162

@@ -217,6 +238,15 @@ func TestMonitor_ControlPlane(t *testing.T) {
217238
Name: "[sig-cli][OCPFeatureGate:UpgradeStatus] oc adm upgrade status control plane section is consistent",
218239
},
219240
},
241+
{
242+
name: "control plane completed",
243+
snapshots: []snapshot{
244+
{when: time.Now(), out: controlPlaneCompleted},
245+
},
246+
expected: &junitapi.JUnitTestCase{
247+
Name: "[sig-cli][OCPFeatureGate:UpgradeStatus] oc adm upgrade status control plane section is consistent",
248+
},
249+
},
220250
}
221251

222252
for _, tc := range testCases {

0 commit comments

Comments
 (0)