summaryrefslogtreecommitdiff
path: root/pkg/bindings/test/volumes_test.go
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-04-15 22:41:06 +0200
committerJakub Guzik <jakubmguzik@gmail.com>2021-04-15 22:41:06 +0200
commit1af1c35efb08bd0dbd80c35d9d47b30f7a386354 (patch)
treedac2f42d9f041a449b08e21bf90c5b568cd9f56a /pkg/bindings/test/volumes_test.go
parent373f15f617db6731c58776c1766a4cf2c74b22b9 (diff)
downloadpodman-1af1c35efb08bd0dbd80c35d9d47b30f7a386354.tar.gz
podman-1af1c35efb08bd0dbd80c35d9d47b30f7a386354.tar.bz2
podman-1af1c35efb08bd0dbd80c35d9d47b30f7a386354.zip
Add network bindings tests: remove and list
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'pkg/bindings/test/volumes_test.go')
-rw-r--r--pkg/bindings/test/volumes_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/bindings/test/volumes_test.go b/pkg/bindings/test/volumes_test.go
index 91f6444cc..14bda114e 100644
--- a/pkg/bindings/test/volumes_test.go
+++ b/pkg/bindings/test/volumes_test.go
@@ -83,7 +83,8 @@ var _ = Describe("Podman volumes", func() {
It("remove volume", func() {
// removing a bogus volume should result in 404
err := volumes.Remove(connText, "foobar", nil)
- code, _ := bindings.CheckResponseCode(err)
+ code, err := bindings.CheckResponseCode(err)
+ Expect(err).To(BeNil())
Expect(code).To(BeNumerically("==", http.StatusNotFound))
// Removing an unused volume should work
@@ -97,9 +98,12 @@ var _ = Describe("Podman volumes", func() {
Expect(err).To(BeNil())
session := bt.runPodman([]string{"run", "-dt", "-v", fmt.Sprintf("%s:/foobar", vol.Name), "--name", "vtest", alpine.name, "top"})
session.Wait(45)
+ Expect(session.ExitCode()).To(BeZero())
+
err = volumes.Remove(connText, vol.Name, nil)
Expect(err).ToNot(BeNil())
- code, _ = bindings.CheckResponseCode(err)
+ code, err = bindings.CheckResponseCode(err)
+ Expect(err).To(BeNil())
Expect(code).To(BeNumerically("==", http.StatusConflict))
// Removing with a volume in use with force should work with a stopped container