mirror of
https://github.com/containers/podman.git
synced 2025-06-27 21:50:18 +08:00
Fix podman cp test by reordering operations
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -163,16 +163,16 @@ var _ = Describe("Podman cp", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman cp symlink", func() {
|
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 := podmanTest.Podman([]string{"run", "-d", ALPINE, "top"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
name := session.OutputToString()
|
name := session.OutputToString()
|
||||||
|
|
||||||
|
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{"exec", name, "ln", "-s", "/tmp", "/test"})
|
session = podmanTest.Podman([]string{"exec", name, "ln", "-s", "/tmp", "/test"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
Reference in New Issue
Block a user