mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Merge pull request #90313 from tangcong/fix-scheduler-static-checkerr
fix e2e scheduling staticcheck error
This commit is contained in:
commit
f7b9960767
@ -1052,15 +1052,19 @@ func GetPodsScheduled(masterNodes sets.String, pods *v1.PodList) (scheduledPods,
|
||||
if pod.Spec.NodeName != "" {
|
||||
_, scheduledCondition := podutil.GetPodCondition(&pod.Status, v1.PodScheduled)
|
||||
framework.ExpectEqual(scheduledCondition != nil, true)
|
||||
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionTrue)
|
||||
scheduledPods = append(scheduledPods, pod)
|
||||
if scheduledCondition != nil {
|
||||
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionTrue)
|
||||
scheduledPods = append(scheduledPods, pod)
|
||||
}
|
||||
} else {
|
||||
_, scheduledCondition := podutil.GetPodCondition(&pod.Status, v1.PodScheduled)
|
||||
framework.ExpectEqual(scheduledCondition != nil, true)
|
||||
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionFalse)
|
||||
if scheduledCondition.Reason == "Unschedulable" {
|
||||
if scheduledCondition != nil {
|
||||
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionFalse)
|
||||
if scheduledCondition.Reason == "Unschedulable" {
|
||||
|
||||
notScheduledPods = append(notScheduledPods, pod)
|
||||
notScheduledPods = append(notScheduledPods, pod)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user