summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-04 14:07:28 -0400
committerGitHub <noreply@github.com>2022-04-04 14:07:28 -0400
commit839744af56ee6a3e54c63eb8da495974666dfdeb (patch)
tree0e2e4735eea7f73918228766dc67760b420ba302 /test
parent330205ebed7b4e196fbc20788440e409464e267a (diff)
parent23cdbf322d3978388166ee2ed68a18dbc4857615 (diff)
downloadpodman-839744af56ee6a3e54c63eb8da495974666dfdeb.tar.gz
podman-839744af56ee6a3e54c63eb8da495974666dfdeb.tar.bz2
podman-839744af56ee6a3e54c63eb8da495974666dfdeb.zip
Merge pull request #13696 from Luap99/apiv2-netavark
test/apiv2: support netavark
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/35-networks.at13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/apiv2/35-networks.at b/test/apiv2/35-networks.at
index 3502b89e0..4aad4563d 100644
--- a/test/apiv2/35-networks.at
+++ b/test/apiv2/35-networks.at
@@ -10,6 +10,8 @@ t POST libpod/networks/create name='"network1"' 200 \
.name=network1 \
.created~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.*
+network1_id=$(jq -r '.id' <<<"$output")
+
t POST /v3.4.0/libpod/networks/create name='"bad_version"' 400 \
.cause='given version is not supported'
@@ -71,10 +73,10 @@ t GET networks?filters='{"label":["abc"]}' 200 \
# old docker filter type see #9526
t GET networks?filters='{"label":{"abc":true}}' 200 \
length=1
-t GET networks?filters='{"id":["a7662f44d65029fd4635c91feea3d720a57cef52e2a9fcc7772b69072cc1ccd1"]}' 200 \
+t GET networks?filters="{\"id\":[\"$network1_id\"]}" 200 \
length=1 \
.[0].Name=network1 \
- .[0].Id=a7662f44d65029fd4635c91feea3d720a57cef52e2a9fcc7772b69072cc1ccd1
+ .[0].Id=$network1_id
# invalid filter
t GET networks?filters='{"dangling":["1"]}' 500 \
.cause='invalid filter "dangling"'
@@ -83,9 +85,9 @@ t GET networks?filters='{"name":["doesnotexists"]}' 200 \
"[]"
# network inspect docker
-t GET networks/a7662f44d65029fd4635c91feea3d720a57cef52e2a9fcc7772b69072cc1ccd1 200 \
+t GET networks/$network1_id 200 \
.Name=network1 \
- .Id=a7662f44d65029fd4635c91feea3d720a57cef52e2a9fcc7772b69072cc1ccd1 \
+ .Id=$network1_id \
.Scope=local
# network create docker
@@ -158,7 +160,8 @@ t POST networks/prune?filters='{"until":["5000000000"]}' 200
t GET networks?filters='{"label":["zaq"]}' 200 length=0
# test macvlan network response
-t POST libpod/networks/create name='"macvlan1"' driver="macvlan" 200 \
+# we have to use a static subnet because of netavark does not support dhcp yet
+t POST libpod/networks/create name='"macvlan1"' driver="macvlan" subnets='[{"subnet":"10.10.135.0/24"}]' 200 \
.name=macvlan1 \
.driver=macvlan