mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #130667 from Chulong-Li/fix
Adjust the test logic on TestGetStaticPodToMirrorPodMap
This commit is contained in:
commit
2ee063dae0
@ -302,7 +302,11 @@ func TestGetStaticPodToMirrorPodMap(t *testing.T) {
|
||||
if len(m) != 1 {
|
||||
t.Fatalf("GetStaticPodToMirrorPodMap(): got %d static pods, wanted 1 static pod", len(m))
|
||||
}
|
||||
if gotMirrorPod, ok := m[staticPod]; !ok || gotMirrorPod.UID != mirrorPod.UID {
|
||||
t.Fatalf("GetStaticPodToMirrorPodMap() did not return the correct mirror pod UID %s, wanted mirror pod UID %s", gotMirrorPod.UID, mirrorPod.UID)
|
||||
gotMirrorPod, ok := m[staticPod]
|
||||
if !ok {
|
||||
t.Fatalf("GetStaticPodToMirrorPodMap(): mirror pod not found for staticPod %v", staticPod)
|
||||
}
|
||||
if gotMirrorPod.UID != mirrorPod.UID {
|
||||
t.Fatalf("GetStaticPodToMirrorPodMap(): got UID %s, want %s", gotMirrorPod.UID, mirrorPod.UID)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user