From b576b793293d94012e1a0030a211039ec9456d9d Mon Sep 17 00:00:00 2001 From: Aditya R Date: Tue, 3 Oct 2023 11:26:28 +0530 Subject: [PATCH] test, manifest: test push retry Test: https://github.com/containers/common/pull/1666 Signed-off-by: Aditya R --- test/e2e/manifest_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index 7cb1e1f695..744108dcff 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -549,6 +549,18 @@ RUN touch /file Expect(output).To(ContainSubstring("Storing list signatures")) }) + It("push must retry", func() { + SkipIfRemote("warning is not relayed in remote setup") + session := podmanTest.Podman([]string{"manifest", "create", "foo", imageList}) + session.WaitWithDefaultTimeout() + Expect(session).Should(ExitCleanly()) + + push := podmanTest.Podman([]string{"manifest", "push", "--all", "--tls-verify=false", "--remove-signatures", "foo", "localhost:7000/bogus"}) + push.WaitWithDefaultTimeout() + Expect(push).Should(Exit(125)) + Expect(push.ErrorToString()).To(MatchRegexp("Copying blob.*Failed, retrying in 1s \\.\\.\\. \\(1/3\\).*Copying blob.*Failed, retrying in 2s")) + }) + It("authenticated push", func() { registryOptions := &podmanRegistry.Options{ PodmanPath: podmanTest.PodmanBinary,