summaryrefslogtreecommitdiff
path: root/test/apiv2/35-networks.at
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-07-21 13:42:21 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-07-26 14:36:10 -0400
commitaef8039d3755e1aa44b2b28c9ca8c4cc52d65251 (patch)
treeb179f5765e91bc706ab3e03e78a8b9ebc002bfe8 /test/apiv2/35-networks.at
parentfa7e9f0f81f5478d456d2c4d6f891c636ddb9a49 (diff)
downloadpodman-aef8039d3755e1aa44b2b28c9ca8c4cc52d65251.tar.gz
podman-aef8039d3755e1aa44b2b28c9ca8c4cc52d65251.tar.bz2
podman-aef8039d3755e1aa44b2b28c9ca8c4cc52d65251.zip
compat api: allow default bridge name for networks
Docker uses "bridge" as default network name so some tools expect this to work with network list or inspect. To fix this we change "bridge" to the podman default ("podman") name. Fixes #14983 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/apiv2/35-networks.at')
-rw-r--r--test/apiv2/35-networks.at12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/apiv2/35-networks.at b/test/apiv2/35-networks.at
index fcff26521..07ba45efb 100644
--- a/test/apiv2/35-networks.at
+++ b/test/apiv2/35-networks.at
@@ -84,12 +84,24 @@ t GET networks?filters='{"dangling":["true","0"]}' 500 \
t GET networks?filters='{"name":["doesnotexists"]}' 200 \
"[]"
+# check default name in list endpoint
+t GET networks 200 \
+ .[].Name~.*bridge.*
+
# network inspect docker
t GET networks/$network1_id 200 \
.Name=network1 \
.Id=$network1_id \
.Scope=local
+# inspect default bridge network
+t GET networks/bridge 200 \
+ .Name=bridge
+
+# inspect default bridge network with real podman name should return real name
+t GET networks/podman 200 \
+ .Name=podman
+
# network create docker
t POST networks/create Name=net3\ IPAM='{"Config":[]}' 201
# network delete docker