File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -381,9 +381,8 @@ var _ = SIGDescribe("Daemon set [Serial]", func() {
381
381
rollback of updates to a DaemonSet.
382
382
*/
383
383
framework .ConformanceIt ("should rollback without unnecessary restarts" , func () {
384
- if framework .TestContext .CloudConfig .NumNodes < 2 {
385
- framework .Logf ("Conformance test suite needs a cluster with at least 2 nodes." )
386
- }
384
+ schedulableNodes := framework .GetReadySchedulableNodesOrDie (c )
385
+ Expect (len (schedulableNodes .Items )).To (BeNumerically (">" , 1 ), "Conformance test suite needs a cluster with at least 2 nodes." )
387
386
framework .Logf ("Create a RollingUpdate DaemonSet" )
388
387
label := map [string ]string {daemonsetNameLabel : dsName }
389
388
ds := newDaemonSet (dsName , image , label )
@@ -421,7 +420,8 @@ var _ = SIGDescribe("Daemon set [Serial]", func() {
421
420
framework .Failf ("unexpected pod found, image = %s" , image )
422
421
}
423
422
}
424
- if framework .TestContext .CloudConfig .NumNodes < 2 {
423
+ schedulableNodes = framework .GetReadySchedulableNodesOrDie (c )
424
+ if len (schedulableNodes .Items ) < 2 {
425
425
Expect (len (existingPods )).To (Equal (0 ))
426
426
} else {
427
427
Expect (len (existingPods )).NotTo (Equal (0 ))
You can’t perform that action at this time.
0 commit comments