Fix PodGC test when PodDisruptionConditions disabled (#118805)

* test comment should match the code in podgc

* Update test/integration/podgc/podgc_test.go

Co-authored-by: Michał Woźniak <mimowo@users.noreply.github.com>

* test comment should match the code in podgc

---------

Co-authored-by: Michał Woźniak <mimowo@users.noreply.github.com>
This commit is contained in:
Kevin Hannon 2023-06-27 08:50:29 -04:00 committed by GitHub
parent 89b1d0ce3e
commit ecd727e4c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,8 +159,8 @@ func TestTerminatingOnOutOfServiceNode(t *testing.T) {
withFinalizer: true, withFinalizer: true,
wantPhase: v1.PodFailed, wantPhase: v1.PodFailed,
}, },
"pod has phase when PodDisruptionConditions disabled": { "pod has phase unchanged when PodDisruptionConditions disabled": {
enablePodDisruptionConditions: true, enablePodDisruptionConditions: false,
withFinalizer: true, withFinalizer: true,
wantPhase: v1.PodPending, wantPhase: v1.PodPending,
}, },
@ -244,7 +244,7 @@ func TestTerminatingOnOutOfServiceNode(t *testing.T) {
} }
if test.withFinalizer { if test.withFinalizer {
// wait until the pod phase is set as expected // wait until the pod phase is set as expected
err = wait.PollImmediate(time.Second, time.Second*15, func() (bool, error) { err = wait.Poll(time.Second, time.Second*15, func() (bool, error) {
var e error var e error
pod, e = cs.CoreV1().Pods(pod.Namespace).Get(testCtx.Ctx, pod.Name, metav1.GetOptions{}) pod, e = cs.CoreV1().Pods(pod.Namespace).Get(testCtx.Ctx, pod.Name, metav1.GetOptions{})
if e != nil { if e != nil {