fix integration tests

This commit is contained in:
Natasha Sarkar
2025-07-21 16:46:13 +00:00
parent 8996e81fc8
commit 53aa4332b5
2 changed files with 18 additions and 14 deletions

View File

@@ -658,8 +658,9 @@ func TestStalePodDisruption(t *testing.T) {
podPhase: v1.PodRunning,
wantConditions: []v1.PodCondition{
{
Type: v1.DisruptionTarget,
Status: v1.ConditionFalse,
Type: v1.DisruptionTarget,
Status: v1.ConditionFalse,
ObservedGeneration: 1,
},
},
},

View File

@@ -49,10 +49,11 @@ func TestPodGcOrphanedPodsWithFinalizer(t *testing.T) {
phase: v1.PodPending,
wantPhase: v1.PodFailed,
wantDisruptionTarget: &v1.PodCondition{
Type: v1.DisruptionTarget,
Status: v1.ConditionTrue,
Reason: "DeletionByPodGC",
Message: "PodGC: node no longer exists",
Type: v1.DisruptionTarget,
Status: v1.ConditionTrue,
ObservedGeneration: 1,
Reason: "DeletionByPodGC",
Message: "PodGC: node no longer exists",
},
},
"succeeded pod": {
@@ -302,10 +303,11 @@ func TestPodGcForPodsWithDuplicatedFieldKeys(t *testing.T) {
},
},
wantDisruptionTarget: &v1.PodCondition{
Type: v1.DisruptionTarget,
Status: v1.ConditionTrue,
Reason: "DeletionByPodGC",
Message: "PodGC: node no longer exists",
Type: v1.DisruptionTarget,
Status: v1.ConditionTrue,
ObservedGeneration: 1,
Reason: "DeletionByPodGC",
Message: "PodGC: node no longer exists",
},
},
"Orphan pod with duplicated ports; scenario from https://issues.k8s.io/113482": {
@@ -335,10 +337,11 @@ func TestPodGcForPodsWithDuplicatedFieldKeys(t *testing.T) {
},
},
wantDisruptionTarget: &v1.PodCondition{
Type: v1.DisruptionTarget,
Status: v1.ConditionTrue,
Reason: "DeletionByPodGC",
Message: "PodGC: node no longer exists",
Type: v1.DisruptionTarget,
Status: v1.ConditionTrue,
ObservedGeneration: 1,
Reason: "DeletionByPodGC",
Message: "PodGC: node no longer exists",
},
},
}