Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/kola: add ext.config.networking.nm-ifcfg-rh-plugin test #1994

Merged
merged 1 commit into from
Mar 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_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"