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 <[email protected]>
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) {