CI: require and test CI_DESIRED_NETWORK on RHEL
Although podman has moved on from CNI, RHEL has not. Make sure that builds on RHEL test the desired network backend(s). Effective immediately, gating.yaml on all RHEL branches must set CI_DESIRED_NETWORK (=cni or =netavark) Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
parent
13b78c9da9
commit
b791dfb558
|
@ -83,8 +83,24 @@ host.slirp4netns.executable | $expr_path
|
|||
}
|
||||
|
||||
@test "podman info - confirm desired network backend" {
|
||||
if [[ -z "$CI_DESIRED_NETWORK" ]]; then
|
||||
# When running on RHEL, CI_DESIRED_NETWORK *must* be defined
|
||||
# in gating.yaml because some versions of RHEL use CNI, some
|
||||
# use netavark.
|
||||
local osrelease=/etc/os-release
|
||||
if [[ -e $osrelease ]]; then
|
||||
local osname=$(source $osrelease; echo $NAME)
|
||||
if [[ $osname =~ Red.Hat ]]; then
|
||||
die "CI_DESIRED_NETWORK must be set in gating.yaml for RHEL testing"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Everywhere other than RHEL, the only supported network is netavark
|
||||
CI_DESIRED_NETWORK="netavark"
|
||||
fi
|
||||
|
||||
run_podman info --format '{{.Host.NetworkBackend}}'
|
||||
is "$output" "netavark" "netavark backend"
|
||||
is "$output" "$CI_DESIRED_NETWORK" ".Host.NetworkBackend"
|
||||
}
|
||||
|
||||
@test "podman info - confirm desired database" {
|
||||
|
|
Loading…
Reference in New Issue