From d014da412eac3ea30bc58265b324b9ba5a6a7ca7 Mon Sep 17 00:00:00 2001 From: Semir Sionek Date: Mon, 28 Apr 2025 06:22:57 -0400 Subject: [PATCH] hs-test: ignore images with no repo tags when creating containers While iterating over images available in the system, the user might have some images with no repo tags, which make hs-test panic when trying to create containers. Make sure that we have repo tags to read from before trying to do that. Type: fix Change-Id: Ibeaf5ac2685b191fcf258455b98f3165c202a319 Signed-off-by: Semir Sionek --- extras/hs-test/infra/container.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extras/hs-test/infra/container.go b/extras/hs-test/infra/container.go index efc317fa96d..50358279f46 100644 --- a/extras/hs-test/infra/container.go +++ b/extras/hs-test/infra/container.go @@ -172,6 +172,9 @@ func (c *Container) Create() error { c.Suite.AssertNil(err) for _, image := range images { + if len(image.RepoTags) == 0 { + continue + } sliceOfImageNames = append(sliceOfImageNames, strings.Split(image.RepoTags[0], ":")[0]) } if !slices.Contains(sliceOfImageNames, c.Image) { -- 2.16.6