summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-30 21:17:28 +0200
committerGitHub <noreply@github.com>2019-05-30 21:17:28 +0200
commit2dcfd3df0b58463b050385c0ccd7929c540bce21 (patch)
tree0cfaee673b6b21c6e3f0645e38d0e205a8067308 /test/e2e
parent7358a4c590526cd656affd20db051dd6a852f3bb (diff)
parent5a07311d9e8f6c66d23b77a3b01abe1d3aa0676d (diff)
downloadpodman-2dcfd3df0b58463b050385c0ccd7929c540bce21.tar.gz
podman-2dcfd3df0b58463b050385c0ccd7929c540bce21.tar.bz2
podman-2dcfd3df0b58463b050385c0ccd7929c540bce21.zip
Merge pull request #3214 from mheon/resolve_symlinks_in_cp
Resolve symlinks in cp
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/cp_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go
index f8df5d3d0..3c0288b19 100644
--- a/test/e2e/cp_test.go
+++ b/test/e2e/cp_test.go
@@ -158,4 +158,27 @@ var _ = Describe("Podman cp", func() {
os.Remove("file.tar")
os.RemoveAll(testDirPath)
})
+
+ It("podman cp symlink", func() {
+ srcPath := filepath.Join(podmanTest.RunRoot, "cp_test.txt")
+ fromHostToContainer := []byte("copy from host to container")
+ err := ioutil.WriteFile(srcPath, fromHostToContainer, 0644)
+ Expect(err).To(BeNil())
+
+ session := podmanTest.Podman([]string{"run", "-d", ALPINE, "top"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ name := session.OutputToString()
+
+ session = podmanTest.Podman([]string{"exec", name, "ln", "-s", "/tmp", "/test"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"cp", "--pause=false", srcPath, name + ":/test"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ _, err = os.Stat("/tmp/cp_test.txt")
+ Expect(err).To(Not(BeNil()))
+ })
})