test/e2e: do not use global variable for image

We have "-kube-test-repo-list" command line flag to override the image registry. If we store it in global variable, then that overriding cannot take effect.

And this can cause puzzling bugs, e.g.: containerIsUnused() function will compare incorrect image address.
This commit is contained in:
huweiwen
2024-02-29 20:24:13 +08:00
committed by 胡玮文
parent 8946348636
commit 6ec421e2cf
30 changed files with 81 additions and 104 deletions

View File

@@ -118,7 +118,7 @@ var _ = SIGDescribe("Container Manager Misc", framework.WithSerial(), func() {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Image: framework.ServeHostnameImage,
Image: imageutils.GetE2EImage(imageutils.Agnhost),
Name: podName,
},
},