diff options
author | Jhon Honce <jhonce@redhat.com> | 2022-02-09 11:17:14 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2022-02-09 14:38:51 -0700 |
commit | 71d1514490e9366646bb28fa151c6b6c8f5745dd (patch) | |
tree | 5f97883f69fe4870f939b2d1939d0faa3ceded30 /pkg/bindings/test/networks_test.go | |
parent | 5b2d96fc29c17253e3ddd0e18ce5f71710b83658 (diff) | |
download | podman-71d1514490e9366646bb28fa151c6b6c8f5745dd.tar.gz podman-71d1514490e9366646bb28fa151c6b6c8f5745dd.tar.bz2 podman-71d1514490e9366646bb28fa151c6b6c8f5745dd.zip |
Add version guard to libpod API endpoints
* Ensure meaningful behaviour when called with /v3.x.x semantics
* Change return code to 409 from 500 when client attempts to use an
existing network name
* Update API bats test runner to support /v4.0.0 endpoints by default
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/bindings/test/networks_test.go')
-rw-r--r-- | pkg/bindings/test/networks_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/bindings/test/networks_test.go b/pkg/bindings/test/networks_test.go index ee2d6f472..137db71a3 100644 --- a/pkg/bindings/test/networks_test.go +++ b/pkg/bindings/test/networks_test.go @@ -80,7 +80,7 @@ var _ = Describe("Podman networks", func() { // Valid filter params => network should be pruned now. filters = map[string][]string{ - "until": {"5000000000"}, //June 11, 2128 + "until": {"5000000000"}, // June 11, 2128 } pruneResponse, err = network.Prune(connText, new(network.PruneOptions).WithFilters(filters)) Expect(err).To(BeNil()) @@ -105,7 +105,7 @@ var _ = Describe("Podman networks", func() { _, err = network.Create(connText, &net) Expect(err).ToNot(BeNil()) code, _ := bindings.CheckResponseCode(err) - Expect(code).To(BeNumerically("==", http.StatusInternalServerError)) + Expect(code).To(BeNumerically("==", http.StatusConflict)) }) It("inspect network", func() { |