mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 08:09:58 +00:00
make linter happy
This commit is contained in:
parent
4e99ada05f
commit
9a8ec13505
@ -3751,7 +3751,9 @@ func Test_queuedPodInfo_gatedSetUponCreationAndUnsetUponUpdate(t *testing.T) {
|
||||
q := NewTestQueue(ctx, newDefaultQueueSort(), WithPreEnqueuePluginMap(m))
|
||||
|
||||
gatedPod := st.MakePod().SchedulingGates([]string{"hello world"}).Obj()
|
||||
q.Add(logger, gatedPod)
|
||||
if err := q.Add(logger, gatedPod); err != nil {
|
||||
t.Error("Error calling Add")
|
||||
}
|
||||
|
||||
if !q.unschedulablePods.get(gatedPod).Gated {
|
||||
t.Error("expected pod to be gated")
|
||||
@ -3759,7 +3761,9 @@ func Test_queuedPodInfo_gatedSetUponCreationAndUnsetUponUpdate(t *testing.T) {
|
||||
|
||||
ungatedPod := gatedPod.DeepCopy()
|
||||
ungatedPod.Spec.SchedulingGates = nil
|
||||
q.Update(logger, gatedPod, ungatedPod)
|
||||
if err := q.Update(logger, gatedPod, ungatedPod); err != nil {
|
||||
t.Error("Error calling Update")
|
||||
}
|
||||
|
||||
ungatedPodInfo, _ := q.Pop(logger)
|
||||
if ungatedPodInfo.Gated {
|
||||
|
@ -191,7 +191,9 @@ func TestGatedPodSchedulableAfterEvent(t *testing.T) {
|
||||
}
|
||||
|
||||
// delete p2, which triggers DeletePodFromCache event
|
||||
cs.CoreV1().Pods(ns).Delete(ctx, "p2", metav1.DeleteOptions{})
|
||||
if err := cs.CoreV1().Pods(ns).Delete(ctx, "p2", metav1.DeleteOptions{}); err != nil {
|
||||
t.Fatal("Error calling Delete on p2")
|
||||
}
|
||||
if err := wait.PollUntilContextTimeout(ctx, 200*time.Millisecond, wait.ForeverTestTimeout, false, testutils.PodDeleted(ctx, cs, ns, "p2")); err != nil {
|
||||
t.Fatal("Failed to delete p2")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user