summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-01-07 16:03:16 +0100
committerPaul Holzinger <pholzing@redhat.com>2022-01-12 17:40:25 +0100
commit85f9cf39039100f956e80b15f42b6ca7763d368a (patch)
tree2bcb30306ebbd9bc5e8f37e332e03689c036360d /test
parent918890a4d6f91a6f4bf844427f7e485676cc117e (diff)
downloadpodman-85f9cf39039100f956e80b15f42b6ca7763d368a.tar.gz
podman-85f9cf39039100f956e80b15f42b6ca7763d368a.tar.bz2
podman-85f9cf39039100f956e80b15f42b6ca7763d368a.zip
upgrade test: check that network backend is cni
Since we test an update from an older version we should check the the network backend is correctly set to CNI. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/upgrade/test-upgrade.bats13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/upgrade/test-upgrade.bats b/test/upgrade/test-upgrade.bats
index c0d601586..5d2435ab9 100644
--- a/test/upgrade/test-upgrade.bats
+++ b/test/upgrade/test-upgrade.bats
@@ -113,6 +113,7 @@ while :;do
echo STOPPING
podman \$opts stop -t 0 myrunningcontainer || true
podman \$opts rm -f myrunningcontainer || true
+ podman \$opts network rm -f mynetwork
exit 0
fi
sleep 0.5
@@ -132,6 +133,9 @@ EOF
$PODMAN run --rm --mac-address 78:28:a6:8d:24:8a --network $netname $OLD_PODMAN true
$PODMAN network rm -f $netname
+ # Podman 4.0 might no longer use cni so /run/cni and /run/containers will no be created in this case
+ mkdir -p /run/cni /run/containers
+
#
# Use new-podman to run the above script under old-podman.
@@ -177,6 +181,13 @@ EOF
:
}
+@test "info" {
+ # check network backend, since this is a old version we should use CNI
+ # when we start testing from 4.0 we should have netavark as backend
+ run_podman info --format '{{.Host.NetworkBackend}}'
+ is "$output" "cni" "correct network backend"
+}
+
@test "images" {
run_podman images -a --format '{{.Names}}'
is "$output" "\[$IMAGE\]" "podman images"
@@ -329,8 +340,6 @@ failed | exited | 17
run_podman logs podman_parent
run_podman rm -f podman_parent
- run_podman network rm -f mynetwork
-
umount $PODMAN_UPGRADE_WORKDIR/root/overlay || true
rm -rf $PODMAN_UPGRADE_WORKDIR