Skip to content

Commit a3e2d92

Browse files
committed
inttests/build-image-index: fix SkipIndex test
In 9c8c43b, the logic was fixed to populate the results by passing through the input image instead of the target image. Adjust integration test accordingly. Signed-off-by: Adam Cmiel <acmiel@redhat.com>
1 parent 09f4fbb commit a3e2d92

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

integration_tests/build_image_index_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,9 @@ func TestBuildImageIndex_SingleImageSkipIndex(t *testing.T) {
323323

324324
// No registry needed - we're skipping index build, just returning input image info
325325
targetImage := "quay.io/test/myapp:latest"
326+
inputImageURL := "quay.io/test/myapp:latest-x86_64"
326327
digest := "sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
327-
imageWithDigest := "quay.io/test/myapp@" + digest
328+
inputImage := inputImageURL + "@" + digest
328329

329330
container := NewBuildCliRunnerContainer("build-image-index", BuildImageIndexImage)
330331
defer container.DeleteIfExists()
@@ -335,7 +336,7 @@ func TestBuildImageIndex_SingleImageSkipIndex(t *testing.T) {
335336
// Run the command with always-build-index=false
336337
args := []string{"image", "build-image-index"}
337338
args = append(args, "--image", targetImage)
338-
args = append(args, "--images", imageWithDigest)
339+
args = append(args, "--images", inputImage)
339340
args = append(args, "--buildah-format", "oci")
340341
args = append(args, "--always-build-index=false")
341342

@@ -348,10 +349,10 @@ func TestBuildImageIndex_SingleImageSkipIndex(t *testing.T) {
348349
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to parse results JSON (stderr: %s)", stderr))
349350

350351
// Verify results - should just return info about the single image
351-
Expect(results.ImageURL).To(Equal(targetImage))
352+
Expect(results.ImageURL).To(Equal(inputImageURL))
352353
Expect(results.ImageDigest).To(Equal(digest))
353354
Expect(results.ImageRef).To(Equal("quay.io/test/myapp@" + digest))
354-
Expect(results.Images).To(Equal(imageWithDigest))
355+
Expect(results.Images).To(Equal("quay.io/test/myapp@" + digest))
355356
}
356357

357358
func TestBuildImageIndex_SingleImageAlwaysBuildIndex(t *testing.T) {

0 commit comments

Comments
 (0)