diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index 0c0e9c4323..ea7ef6f65e 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -4,7 +4,6 @@ package integration import ( "fmt" - "io" "os" "path/filepath" "runtime" @@ -668,33 +667,13 @@ var _ = Describe("Podman pull", func() { podmanTest.AddImageToRWStore(ALPINE) - success := false - registryArgs := []string{"run", "-d", "--name", "registry", "-p", "5012:5000"} if isRootless() { err := podmanTest.RestoreArtifact(REGISTRY_IMAGE) Expect(err).ToNot(HaveOccurred()) - - // Debug code for https://github.com/containers/podman/issues/24219 - logFile := filepath.Join(podmanTest.TempDir, "pasta.log") - registryArgs = append(registryArgs, "--network", "pasta:--trace,--log-file,"+logFile) - defer func() { - if success { - // only print the log on errors otherwise it will clutter CI logs way to much - return - } - - f, err := os.Open(logFile) - Expect(err).ToNot(HaveOccurred()) - defer f.Close() - GinkgoWriter.Println("pasta trace log:") - _, err = io.Copy(GinkgoWriter, f) - Expect(err).ToNot(HaveOccurred()) - }() } - registryArgs = append(registryArgs, REGISTRY_IMAGE, "/entrypoint.sh", "/etc/docker/registry/config.yml") lock := GetPortLock("5012") defer lock.Unlock() - session := podmanTest.Podman(registryArgs) + session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5012:5000", REGISTRY_IMAGE, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) @@ -707,8 +686,6 @@ var _ = Describe("Podman pull", func() { session = decryptionTestHelper(imgPath) Expect(session.LineInOutputContainsTag(imgPath, "latest")).To(BeTrue()) - - success = true }) }) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 4dd9ffd2d5..38576c9b64 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -4,7 +4,6 @@ package integration import ( "fmt" - "io" "net" "os" "path/filepath" @@ -2354,31 +2353,9 @@ WORKDIR /madethis`, BB) podmanTest.AddImageToRWStore(ALPINE) - success := false - registryArgs := []string{"run", "-d", "--name", "registry", "-p", "5006:5000"} - if isRootless() { - // Debug code for https://github.com/containers/podman/issues/24219 - logFile := filepath.Join(podmanTest.TempDir, "pasta.log") - registryArgs = append(registryArgs, "--network", "pasta:--trace,--log-file,"+logFile) - defer func() { - if success { - // only print the log on errors otherwise it will clutter CI logs way to much - return - } - - f, err := os.Open(logFile) - Expect(err).ToNot(HaveOccurred()) - defer f.Close() - GinkgoWriter.Println("pasta trace log:") - _, err = io.Copy(GinkgoWriter, f) - Expect(err).ToNot(HaveOccurred()) - }() - } - registryArgs = append(registryArgs, REGISTRY_IMAGE, "/entrypoint.sh", "/etc/docker/registry/config.yml") - lock := GetPortLock("5006") defer lock.Unlock() - session := podmanTest.Podman(registryArgs) + session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5006:5000", REGISTRY_IMAGE, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) @@ -2412,8 +2389,6 @@ WORKDIR /madethis`, BB) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.ErrorToString()).To(ContainSubstring("Trying to pull " + imgPath)) - - success = true }) It("podman run --shm-size-systemd", func() {