diff --git a/pkg/kubelet/cm/containermap/container_map_test.go b/pkg/kubelet/cm/containermap/container_map_test.go index 0e6d1211c8c..94b011ea314 100644 --- a/pkg/kubelet/cm/containermap/container_map_test.go +++ b/pkg/kubelet/cm/containermap/container_map_test.go @@ -52,7 +52,7 @@ func TestContainerMapCloneUnshared(t *testing.T) { // check the original copy didn't change // early sanity check, random ID, no special meaning podUIDRedo, containerNameRedo, err2 := cm.GetContainerRef("fakeContainerID-C") - if err != nil { + if err2 != nil { t.Fatalf("unexpected error: %v", err2) } if podUIDRedo != "fakePodUID-2" || containerNameRedo != "fakeContainerName-c2" {