Skip to content

Commit

Permalink
tests/kola: add ext.config.networking.nm-ifcfg-rh-plugin test
Browse files Browse the repository at this point in the history
This test checks that the ifcfg-rh NetworkManager plugin is in
the state we expect it to be in. Some more context in:

- coreos#1993
- coreos#1991
- openshift/os#1022
  • Loading branch information
dustymabe committed Sep 30, 2022
1 parent f706a4f commit db9fa35
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/kola/networking/nm-ifcfg-rh-plugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#
# We want to do a check here to make sure the ifcfg-rh plugin
# is not loaded on FCOS (it can't be because it should never
# even be included in the filesystem). We also want to make
# sure that at least for RHCOS8 it is included.
#
## kola:
## # This test should behave the same on every platform.
## tags: "platform-independent"
## # This is a read-only, nondestructive test.
## exclusive: false

set -xeuo pipefail

. $KOLA_EXT_DATA/commonlib.sh


# Check if it exists or not. The plugin provides a dbus interface
# so if it is loaded there will be something listening at that name
exists=0
busctl status com.redhat.ifcfgrh1 && exists=1

if is_fcos; then
[ "$exists" == "0" ] || fatal "ifcfg-rh plugin detected on FCOS"
elif is_rhcos8; then
[ "$exists" == "1" ] || fatal "ifcfg-rh plugin not detected on RHCOS8"
else
fatal "nm-ifcfg-rh-plugin does not support this distro/version"
fi

ok "ifcfg-rh plugin test successful"

0 comments on commit db9fa35

Please sign in to comment.