summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-11 15:31:03 +0100
committerGitHub <noreply@github.com>2020-11-11 15:31:03 +0100
commite443c01437d6b592a0d580f09d92d6c4ef795089 (patch)
tree098252c6f7699c286a1ef21b9cbb797a5158763f /test
parentbb07b8c9f1d6b8f24fef91d96cc9c3a3ea381d20 (diff)
parentb917b9925cb17ecb36472ab1122a1891825af38b (diff)
downloadpodman-e443c01437d6b592a0d580f09d92d6c4ef795089.tar.gz
podman-e443c01437d6b592a0d580f09d92d6c4ef795089.tar.bz2
podman-e443c01437d6b592a0d580f09d92d6c4ef795089.zip
Merge pull request #8295 from baude/issue8294
Set default network driver for APIv2 networks
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/35-networks.at90
1 files changed, 43 insertions, 47 deletions
diff --git a/test/apiv2/35-networks.at b/test/apiv2/35-networks.at
index 72c63207d..ad34511c7 100644
--- a/test/apiv2/35-networks.at
+++ b/test/apiv2/35-networks.at
@@ -6,52 +6,48 @@
t GET networks/non-existing-network 404 \
.cause='network not found'
-# FIXME FIXME FIXME: failing in CI. Deferring to someone else to fix later.
-#if root; then
-if false; then
- t POST libpod/networks/create?name=network1 '' 200 \
- .Filename~.*/network1\\.conflist
-
- # --data '{"Subnet":{"IP":"10.10.254.0","Mask":[255,255,255,0]}}'
- t POST libpod/networks/create?name=network2 '"Subnet":{"IP":"10.10.254.0","Mask":[255,255,255,0]}' 200 \
- .Filename~.*/network2\\.conflist
-
- # test for empty mask
- t POST libpod/networks/create '"Subnet":{"IP":"10.10.1.0","Mask":[]}' 500 \
- .cause~'.*cannot be empty'
- # test for invalid mask
- t POST libpod/networks/create '"Subnet":{"IP":"10.10.1.0","Mask":[0,255,255,0]}' 500 \
- .cause~'.*mask is invalid'
-
- # network list
- t GET libpod/networks/json 200
- t GET libpod/networks/json?filter=name=network1 200 \
- length=1 \
- .[0].Name=network1
- t GET networks 200
-
- #network list docker endpoint
- #filters={"name":["network1","network2"]}
- t GET networks?filters=%7B%22name%22%3A%5B%22network1%22%2C%22network2%22%5D%7D 200 \
- length=2
- #filters={"name":["network"]}
- t GET networks?filters=%7B%22name%22%3A%5B%22network%22%5D%7D 200 \
- length=2
- # invalid filter filters={"label":"abc"}
- t GET networks?filters=%7B%22label%22%3A%5B%22abc%22%5D%7D 500 \
- .cause="only the name filter for listing networks is implemented"
- # invalid filter filters={"label":"abc","name":["network"]}
- t GET networks?filters=%7B%22label%22%3A%22abc%22%2C%22name%22%3A%5B%22network%22%5D%7D 500 \
- .cause="only the name filter for listing networks is implemented"
-
- # clean the network
- t DELETE libpod/networks/network1 200 \
- .[0].Name~network1 \
- .[0].Err=null
- t DELETE libpod/networks/network2 200 \
- .[0].Name~network2 \
- .[0].Err=null
-
-fi
+t POST libpod/networks/create?name=network1 '' 200 \
+.Filename~.*/network1\\.conflist
+
+# --data '{"Subnet":{"IP":"10.10.254.0","Mask":[255,255,255,0]}}'
+t POST libpod/networks/create?name=network2 '"Subnet":{"IP":"10.10.254.0","Mask":[255,255,255,0]}' 200 \
+.Filename~.*/network2\\.conflist
+
+# test for empty mask
+t POST libpod/networks/create '"Subnet":{"IP":"10.10.1.0","Mask":[]}' 500 \
+.cause~'.*cannot be empty'
+# test for invalid mask
+t POST libpod/networks/create '"Subnet":{"IP":"10.10.1.0","Mask":[0,255,255,0]}' 500 \
+.cause~'.*mask is invalid'
+
+# network list
+t GET libpod/networks/json 200
+t GET libpod/networks/json?filter=name=network1 200 \
+length=1 \
+.[0].Name=network1
+t GET networks 200
+
+#network list docker endpoint
+#filters={"name":["network1","network2"]}
+t GET networks?filters=%7B%22name%22%3A%5B%22network1%22%2C%22network2%22%5D%7D 200 \
+length=2
+#filters={"name":["network"]}
+t GET networks?filters=%7B%22name%22%3A%5B%22network%22%5D%7D 200 \
+length=2
+# invalid filter filters={"label":"abc"}
+t GET networks?filters=%7B%22label%22%3A%5B%22abc%22%5D%7D 500 \
+.cause="only the name filter for listing networks is implemented"
+# invalid filter filters={"label":"abc","name":["network"]}
+t GET networks?filters=%7B%22label%22%3A%22abc%22%2C%22name%22%3A%5B%22network%22%5D%7D 500 \
+.cause="only the name filter for listing networks is implemented"
+
+# clean the network
+t DELETE libpod/networks/network1 200 \
+.[0].Name~network1 \
+.[0].Err=null
+t DELETE libpod/networks/network2 200 \
+.[0].Name~network2 \
+.[0].Err=null
+
# vim: filetype=sh