Merge pull request #121531 from saschagrunert/e2e-node-imageid

Make e2e node image ID test more flexible
This commit is contained in:
Kubernetes Prow Robot 2023-10-30 17:40:16 +01:00 committed by GitHub
commit c7a7cb8e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,12 +60,12 @@ var _ = SIGDescribe("ImageID [NodeFeature: ImageID]", func() {
framework.ExpectNoError(err)
status := runningPod.Status
if len(status.ContainerStatuses) == 0 {
framework.Failf("Unexpected pod status; %s", dump.Pretty(status))
return
}
gomega.Expect(status.ContainerStatuses[0].ImageID).To(gomega.ContainSubstring(busyBoxImage))
gomega.Expect(status.ContainerStatuses).To(gomega.HaveLen(1), dump.Pretty(status))
gomega.Expect(status.ContainerStatuses[0].ImageID).To(
gomega.SatisfyAny(
gomega.Equal(busyBoxImage),
gomega.MatchRegexp(`[[:xdigit:]]{64}`),
),
)
})
})