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 /test/apiv2/35-networks.at | |
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 'test/apiv2/35-networks.at')
-rw-r--r-- | test/apiv2/35-networks.at | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/apiv2/35-networks.at b/test/apiv2/35-networks.at index 0e2389bd5..3502b89e0 100644 --- a/test/apiv2/35-networks.at +++ b/test/apiv2/35-networks.at @@ -8,7 +8,10 @@ t GET networks/non-existing-network 404 \ t POST libpod/networks/create name='"network1"' 200 \ .name=network1 \ - .created~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \ + .created~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* + +t POST /v3.4.0/libpod/networks/create name='"bad_version"' 400 \ + .cause='given version is not supported' # --data '{"name":"network2","subnets":[{"subnet":"10.10.254.0/24"}],"Labels":{"abc":"val"}}' t POST libpod/networks/create name='"network2"' \ |