summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-16 01:08:05 +0200
committerGitHub <noreply@github.com>2019-05-16 01:08:05 +0200
commit95d90c1de7035ded6a4a05e6e3a80f0b32cbdf39 (patch)
tree6b936999c1110e086cbc805346b5c4932a0b31c2 /test
parent7ede1594652003e1ec545dc5c98c44142dcdd7c3 (diff)
parent5b3f3c411058ecd22431b119a2db6e8ce7cf111b (diff)
downloadpodman-95d90c1de7035ded6a4a05e6e3a80f0b32cbdf39.tar.gz
podman-95d90c1de7035ded6a4a05e6e3a80f0b32cbdf39.tar.bz2
podman-95d90c1de7035ded6a4a05e6e3a80f0b32cbdf39.zip
Merge pull request #3127 from mheon/fix_start_race
Ensure that start() in StartAndAttach() is locked
Diffstat (limited to 'test')
-rw-r--r--test/e2e/cp_test.go37
1 files changed, 10 insertions, 27 deletions
diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go
index 273668f35..1dfa8f50d 100644
--- a/test/e2e/cp_test.go
+++ b/test/e2e/cp_test.go
@@ -40,15 +40,11 @@ var _ = Describe("Podman cp", func() {
It("podman cp file", func() {
path, err := os.Getwd()
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
filePath := filepath.Join(path, "cp_test.txt")
fromHostToContainer := []byte("copy from host to container")
err = ioutil.WriteFile(filePath, fromHostToContainer, 0644)
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
session := podmanTest.Podman([]string{"create", ALPINE, "cat", "foo"})
session.WaitWithDefaultTimeout()
@@ -69,15 +65,12 @@ var _ = Describe("Podman cp", func() {
It("podman cp file to dir", func() {
path, err := os.Getwd()
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
filePath := filepath.Join(path, "cp_test.txt")
fromHostToContainer := []byte("copy from host to container directory")
err = ioutil.WriteFile(filePath, fromHostToContainer, 0644)
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
+
session := podmanTest.Podman([]string{"create", ALPINE, "ls", "foodir/"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -97,14 +90,10 @@ var _ = Describe("Podman cp", func() {
It("podman cp dir to dir", func() {
path, err := os.Getwd()
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
testDirPath := filepath.Join(path, "TestDir")
err = os.Mkdir(testDirPath, 0777)
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
session := podmanTest.Podman([]string{"create", ALPINE, "ls", "/foodir"})
session.WaitWithDefaultTimeout()
@@ -124,19 +113,13 @@ var _ = Describe("Podman cp", func() {
It("podman cp stdin/stdout", func() {
path, err := os.Getwd()
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
testDirPath := filepath.Join(path, "TestDir")
err = os.Mkdir(testDirPath, 0777)
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
cmd := exec.Command("tar", "-zcvf", "file.tar.gz", testDirPath)
_, err = cmd.Output()
- if err != nil {
- os.Exit(1)
- }
+ Expect(err).To(BeNil())
session := podmanTest.Podman([]string{"create", ALPINE, "ls", "foo"})
session.WaitWithDefaultTimeout()