forked from coreos/fedora-coreos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/kola: add ext.config.networking.nm-ifcfg-rh-plugin test
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
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_rhcos || is_scos; then | ||
[ "$exists" == "1" ] || fatal "ifcfg-rh plugin not detected on RHCOS/SCOS" | ||
else | ||
fatal "nm-ifcfg-rh-plugin does not support this distro/version" | ||
fi | ||
|
||
ok "ifcfg-rh plugin test successful" |