summaryrefslogtreecommitdiff
path: root/test/e2e/run_volume_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_volume_test.go')
-rw-r--r--test/e2e/run_volume_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 74aa69c96..3d05e0f70 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -410,7 +410,7 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE)
list2.WaitWithDefaultTimeout()
Expect(list2).Should(Exit(0))
arr := list2.OutputToStringArray()
- Expect(len(arr)).To(Equal(1))
+ Expect(arr).To(HaveLen(1))
Expect(arr[0]).To(Not(Equal("")))
})
@@ -429,7 +429,7 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE)
list2.WaitWithDefaultTimeout()
Expect(list2).Should(Exit(0))
arr := list2.OutputToStringArray()
- Expect(len(arr)).To(Equal(1))
+ Expect(arr).To(HaveLen(1))
Expect(arr[0]).To(Not(Equal("")))
remove := podmanTest.Podman([]string{"rm", "-v", ctrName})
@@ -458,7 +458,7 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE)
list2.WaitWithDefaultTimeout()
Expect(list2).Should(Exit(0))
arr := list2.OutputToStringArray()
- Expect(len(arr)).To(Equal(1))
+ Expect(arr).To(HaveLen(1))
Expect(arr[0]).To(Equal(volName))
remove := podmanTest.Podman([]string{"rm", "-v", ctrName})
@@ -469,7 +469,7 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE)
list3.WaitWithDefaultTimeout()
Expect(list3).Should(Exit(0))
arr2 := list3.OutputToStringArray()
- Expect(len(arr2)).To(Equal(1))
+ Expect(arr2).To(HaveLen(1))
Expect(arr2[0]).To(Equal(volName))
})
@@ -511,7 +511,7 @@ RUN sh -c "cd /etc/apk && ln -s ../../testfile"`, ALPINE)
runLs.WaitWithDefaultTimeout()
Expect(runLs).Should(Exit(0))
outputArr := runLs.OutputToStringArray()
- Expect(len(outputArr)).To(Equal(1))
+ Expect(outputArr).To(HaveLen(1))
Expect(outputArr[0]).To(ContainSubstring(fileName))
})
@@ -527,8 +527,8 @@ VOLUME /test/`, ALPINE)
Expect(create).Should(Exit(0))
data := podmanTest.InspectContainer(ctrName)
- Expect(len(data)).To(Equal(1))
- Expect(len(data[0].Mounts)).To(Equal(1))
+ Expect(data).To(HaveLen(1))
+ Expect(data[0].Mounts).To(HaveLen(1))
Expect(data[0].Mounts[0].Source).To(Equal("/tmp"))
Expect(data[0].Mounts[0].Destination).To(Equal("/test"))
})
@@ -626,7 +626,7 @@ VOLUME /test/`, ALPINE)
session := podmanTest.Podman([]string{"run", "-t", "-i", "-v", fmt.Sprintf("%s:/test1", volName), "-v", fmt.Sprintf("%s:/test2", volName), "--rm", ALPINE, "sh", "-c", "mount | grep /test"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(len(session.OutputToStringArray())).To(Equal(2))
+ Expect(session.OutputToStringArray()).To(HaveLen(2))
})
It("podman run with --volume and U flag", func() {