diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-17 06:35:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-17 06:35:49 -0400 |
commit | 6ff56ab50a10e2350013c4ff1bf4b8d5d7b5aa87 (patch) | |
tree | e4dd52405640b76a25c22734bbd43f491205aee5 /pkg/bindings/test/volumes_test.go | |
parent | 676c33f07950b29b657370df5e767452692be648 (diff) | |
parent | 1af1c35efb08bd0dbd80c35d9d47b30f7a386354 (diff) | |
download | podman-6ff56ab50a10e2350013c4ff1bf4b8d5d7b5aa87.tar.gz podman-6ff56ab50a10e2350013c4ff1bf4b8d5d7b5aa87.tar.bz2 podman-6ff56ab50a10e2350013c4ff1bf4b8d5d7b5aa87.zip |
Merge pull request #10018 from jmguzik/more-network-bindings-tests
Add network bindings tests: remove and list
Diffstat (limited to 'pkg/bindings/test/volumes_test.go')
-rw-r--r-- | pkg/bindings/test/volumes_test.go | 8 |
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 |