summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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..529e01c99 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{"create", ALPINE, "cat", "foo"})
+ 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", srcPath, name + ":/test"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ _, err = os.Stat("/tmp/cp_test.txt")
+ Expect(err).To(Not(BeNil()))
+ })
})