Skip to content

Commit

Permalink
Fixed image ztocs returned by prepareSociIndices(). Now obtaining zto…
Browse files Browse the repository at this point in the history
…cs for the corresponding image

Signed-off-by: Yasin Turan <turyasin@amazon.com>
  • Loading branch information
turan18 committed Jan 20, 2023
1 parent cf0ce7b commit b9a7fd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integration/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func prepareSociIndices(t *testing.T, sh *dockershell.Shell) []testImageIndex {
}
img.imgInfo = dockerhub(img.imgName, withPlatform(platform))
img.sociIndexDigest = buildIndex(sh, img.imgInfo)
ztocDigests, err := getZtocDigests(sh, img.imgInfo)
ztocDigests, err := getZtocDigestsForImage(sh, img.imgInfo)
if err != nil {
t.Fatalf("could not get ztoc digests: %v", err)
}
Expand All @@ -80,8 +80,8 @@ func prepareSociIndices(t *testing.T, sh *dockershell.Shell) []testImageIndex {
return testImages
}

func getZtocDigests(sh *dockershell.Shell, img imageInfo) ([]string, error) {
ztocInfoBytes := sh.O("soci", "ztoc", "list")
func getZtocDigestsForImage(sh *dockershell.Shell, img imageInfo) ([]string, error) {
ztocInfoBytes := sh.O("soci", "ztoc", "list", "--image-ref", img.ref)
scanner := bufio.NewScanner(bytes.NewReader(ztocInfoBytes))
scanner.Split(bufio.ScanLines)
var lines []string
Expand Down

0 comments on commit b9a7fd6

Please sign in to comment.