From ac38eca3fdaa723a6c96fd2bcfa882d1ab2a09fb Mon Sep 17 00:00:00 2001 From: cdoern Date: Mon, 8 Nov 2021 11:25:47 -0500 Subject: Podman Image SCP transfer patch Fixed syntax so that podman image scp transfer works with no user specified. This command can only be executed as root so to obtain the default user, I searched for the SUDO_USER environmental variable. If that is not found, we error out and inform the user to set this variable and make sure they are running as root Signed-off-by: cdoern Signed-off-by: cdoern --- test/e2e/image_scp_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/e2e/image_scp_test.go') diff --git a/test/e2e/image_scp_test.go b/test/e2e/image_scp_test.go index acea2993d..3e7e8da48 100644 --- a/test/e2e/image_scp_test.go +++ b/test/e2e/image_scp_test.go @@ -78,6 +78,10 @@ var _ = Describe("podman image scp", func() { list.WaitWithDefaultTimeout() Expect(list).To(Exit(0)) Expect(list.LineInOutputStartsWith("quay.io/libpod/alpine")).To(BeTrue()) + + scp = podmanTest.PodmanAsUser([]string{"image", "scp", "root@localhost::" + ALPINE}, 0, 0, "", env) //transfer from root to rootless (us) + scp.WaitWithDefaultTimeout() + Expect(scp).To(Exit(0)) }) It("podman image scp bogus image", func() { -- cgit v1.2.3-54-g00ecf