Merge pull request #26683 from TomSweeneyRedHat/dev/tsweeney/skip_diff_tests

Skip rather than comment bad diff tests
This commit is contained in:
openshift-merge-bot[bot]
2025-07-28 14:11:09 +00:00
committed by GitHub

View File

@ -72,6 +72,7 @@ var _ = Describe("Podman diff", func() {
}) })
It("podman image diff", func() { It("podman image diff", func() {
Skip("FIXME: #26680 Broken with Buildah v1.41 diff test showing different behavior base on storage driver")
file1 := "/" + stringid.GenerateRandomID() file1 := "/" + stringid.GenerateRandomID()
file2 := "/" + stringid.GenerateRandomID() file2 := "/" + stringid.GenerateRandomID()
file3 := "/" + stringid.GenerateRandomID() file3 := "/" + stringid.GenerateRandomID()
@ -104,11 +105,10 @@ RUN echo test
session = podmanTest.Podman([]string{"image", "diff", image, baseImage}) session = podmanTest.Podman([]string{"image", "diff", image, baseImage})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly()) Expect(session).Should(ExitCleanly())
// Comment out https://github.com/containers/podman/issues/26680. Expect(session.OutputToStringArray()).To(HaveLen(4))
// Expect(session.OutputToStringArray()).To(HaveLen(4)) Expect(session.OutputToString()).To(ContainSubstring("A " + file1))
// Expect(session.OutputToString()).To(ContainSubstring("A " + file1)) Expect(session.OutputToString()).To(ContainSubstring("A " + file2))
// Expect(session.OutputToString()).To(ContainSubstring("A " + file2)) Expect(session.OutputToString()).To(ContainSubstring("A " + file3))
// Expect(session.OutputToString()).To(ContainSubstring("A " + file3))
}) })
It("podman image diff of single image", func() { It("podman image diff of single image", func() {
@ -131,46 +131,43 @@ RUN echo test
Expect(session.OutputToStringArray()).To(BeEmpty()) Expect(session.OutputToStringArray()).To(BeEmpty())
}) })
// Commented out on July 23, 2025 to avoid issue noted in It("podman diff container and image with same name", func() {
// https://github.com/containers/podman/issues/26680. Uncomment Skip("FIXME: #26680 Broken with Buildah v1.41 diff test showing different behavior base on storage driver")
// once that is addressed. imagefile := "/" + stringid.GenerateRandomID()
// confile := "/" + stringid.GenerateRandomID()
// It("podman diff container and image with same name", func() {
// imagefile := "/" + stringid.GenerateRandomID() // Create container image with the files
// confile := "/" + stringid.GenerateRandomID() containerfile := fmt.Sprintf(`
// FROM %s
// // Create container image with the files RUN touch %s`, ALPINE, imagefile)
// containerfile := fmt.Sprintf(`
// FROM %s name := "podman-diff-test"
// RUN touch %s`, ALPINE, imagefile) podmanTest.BuildImage(containerfile, name, "false")
//
// name := "podman-diff-test" session := podmanTest.Podman([]string{"run", "--name", name, ALPINE, "touch", confile})
// podmanTest.BuildImage(containerfile, name, "false") session.WaitWithDefaultTimeout()
// Expect(session).Should(ExitCleanly())
// session := podmanTest.Podman([]string{"run", "--name", name, ALPINE, "touch", confile})
// session.WaitWithDefaultTimeout() // podman diff prefers image over container when they have the same name
// Expect(session).Should(ExitCleanly()) session = podmanTest.Podman([]string{"diff", name})
// session.WaitWithDefaultTimeout()
// // podman diff prefers image over container when they have the same name Expect(session).Should(ExitCleanly())
// session = podmanTest.Podman([]string{"diff", name}) Expect(session.OutputToStringArray()).To(HaveLen(1))
// session.WaitWithDefaultTimeout() Expect(session.OutputToString()).To(ContainSubstring(imagefile))
// Expect(session).Should(ExitCleanly())
// Expect(session.OutputToStringArray()).To(HaveLen(1)) session = podmanTest.Podman([]string{"image", "diff", name})
// Expect(session.OutputToString()).To(ContainSubstring(imagefile)) session.WaitWithDefaultTimeout()
// Expect(session).Should(ExitCleanly())
// session = podmanTest.Podman([]string{"image", "diff", name}) Expect(session.OutputToStringArray()).To(HaveLen(1))
// session.WaitWithDefaultTimeout() Expect(session.OutputToString()).To(ContainSubstring(imagefile))
// Expect(session).Should(ExitCleanly())
// Expect(session.OutputToStringArray()).To(HaveLen(1)) // container diff has to show the container
// Expect(session.OutputToString()).To(ContainSubstring(imagefile)) session = podmanTest.Podman([]string{"container", "diff", name})
// session.WaitWithDefaultTimeout()
// // container diff has to show the container Expect(session).Should(ExitCleanly())
// session = podmanTest.Podman([]string{"container", "diff", name}) Expect(session.OutputToStringArray()).To(HaveLen(2))
// session.WaitWithDefaultTimeout() Expect(session.OutputToString()).To(ContainSubstring(confile))
// Expect(session).Should(ExitCleanly()) })
// Expect(session.OutputToStringArray()).To(HaveLen(2))
// Expect(session.OutputToString()).To(ContainSubstring(confile))
// })
It("podman diff without args", func() { It("podman diff without args", func() {
session := podmanTest.Podman([]string{"diff"}) session := podmanTest.Podman([]string{"diff"})