diff --git a/internal/integration/api/containers.go b/internal/integration/api/containers.go index 896292d576..0ce0892e47 100644 --- a/internal/integration/api/containers.go +++ b/internal/integration/api/containers.go @@ -56,11 +56,17 @@ func (suite *ContainersSuite) TestSandboxImage() { for _, message := range resp.GetMessages() { suite.Assert().NotEmpty(message.GetContainers()) + matched := false + for _, ctr := range message.GetContainers() { - if ctr.PodId == "" { + if ctr.PodId == ctr.Id { suite.Assert().Equal(images.DefaultSandboxImage, ctr.Image) + + matched = true } } + + suite.Assert().True(matched, "no pods found, node %s", node) } } diff --git a/pkg/images/list.go b/pkg/images/list.go index 324d280f0e..97e738e67b 100644 --- a/pkg/images/list.go +++ b/pkg/images/list.go @@ -31,7 +31,7 @@ type Versions struct { // DefaultSandboxImage is defined as a constant in cri package of containerd, and it's not exported. // // The integration test verifies that our constant is accurate. -const DefaultSandboxImage = "registry.k8s.io/pause:3.9" +const DefaultSandboxImage = "registry.k8s.io/pause:3.10" // List returns default image versions. func List(config config.Config) Versions {