diff options
author | Chris Evich <cevich@redhat.com> | 2022-04-08 10:29:38 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2022-04-21 14:38:07 -0400 |
commit | d24507c1ec5ec5108a31293ff59d21cf0c69d565 (patch) | |
tree | 1ccea4a7311b8120ecca2b9f7ecc82f0c8906975 /test/upgrade | |
parent | cb09c26c6519c2fff8be7285d585672a9066f2da (diff) | |
download | podman-d24507c1ec5ec5108a31293ff59d21cf0c69d565.tar.gz podman-d24507c1ec5ec5108a31293ff59d21cf0c69d565.tar.bz2 podman-d24507c1ec5ec5108a31293ff59d21cf0c69d565.zip |
Fix upgrade tests assuming storage.conf exists
On F36 / podman 4, at the time of this commit there is no
`/etc/containers/storage.conf` installed by default. Since the
test volume-mounts this file into the container, it was failing. Fix
this by using a conditional volume-mount based on the file existing (or
not).
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'test/upgrade')
-rw-r--r-- | test/upgrade/test-upgrade.bats | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/upgrade/test-upgrade.bats b/test/upgrade/test-upgrade.bats index 198d8a169..5efe05d49 100644 --- a/test/upgrade/test-upgrade.bats +++ b/test/upgrade/test-upgrade.bats @@ -146,6 +146,12 @@ EOF # cause connectivity issues since cni and netavark should never be mixed. mkdir -p /run/netns /run/cni /run/containers /var/lib/cni /etc/cni/net.d + # Containers-common around release 1-55 no-longer supplies this file + sconf=/etc/containers/storage.conf + v_sconf= + if [[ -e "$sconf" ]]; then + v_sconf="-v $sconf:$sconf" + fi # # Use new-podman to run the above script under old-podman. @@ -165,7 +171,7 @@ EOF --net=host \ --cgroupns=host \ --pid=host \ - -v /etc/containers/storage.conf:/etc/containers/storage.conf \ + $v_sconf \ -v /dev/fuse:/dev/fuse \ -v /run/crun:/run/crun \ -v /run/netns:/run/netns:rshared \ |