From c755b6d7e4600fdfb32be50422b7efb0fdabef63 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 28 Oct 2024 14:52:19 +0400 Subject: [PATCH] fix: update the CRI sandbox image reference Fix the test, and update the reference. Signed-off-by: Andrey Smirnov --- internal/integration/api/containers.go | 8 +++++++- pkg/images/list.go | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) 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 {