Skip to content
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
15 changes: 10 additions & 5 deletions tests/kola/networking/default-network-behavior-change/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set -xeuo pipefail
. $KOLA_EXT_DATA/commonlib.sh

# EXPECTED_INITRD_NETWORK_CFG1
# - used on FCOS 35+ releases
# - used on Fedora 35+ and RHEL 8.5+ releases
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! update line 45 too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, though the comments are duplicating the conditionals; I think it's better to have a single source of truth. i.e. I'd lean towards deleting the comments instead. But for now, updated that line too

EXPECTED_INITRD_NETWORK_CFG1="[connection]
id=Wired Connection
uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Expand Down Expand Up @@ -42,7 +42,7 @@ method=auto
[user]
org.freedesktop.NetworkManager.origin=nm-initrd-generator"
# EXPECTED_INITRD_NETWORK_CFG2
# - used on all RHCOS releases
# - used on older RHCOS <= 4.10 releases
EXPECTED_INITRD_NETWORK_CFG2="[connection]
id=Wired Connection
uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Expand Down Expand Up @@ -106,18 +106,23 @@ normalize_connection_file() {

source /etc/os-release
# All current FCOS releases use the same config
EXPECTED_INITRD_NETWORK_CFG=$EXPECTED_INITRD_NETWORK_CFG1
EXPECTED_REALROOT_NETWORK_CFG=$EXPECTED_REALROOT_NETWORK_CFG1
if [ "$ID" == "fedora" ]; then
if [ "$VERSION_ID" -ge "35" ]; then
EXPECTED_INITRD_NETWORK_CFG=$EXPECTED_INITRD_NETWORK_CFG1
EXPECTED_REALROOT_NETWORK_CFG=$EXPECTED_REALROOT_NETWORK_CFG1
echo "Using defaults"
else
fatal "fail: not operating on expected OS version"
fi
elif [ "$ID" == "rhcos" ]; then
# For the version comparison use string substitution to remove the
# '.` from the version so we can use integer comparison
RHCOS_MINIMUM_VERSION="4.7"
if [ "${VERSION_ID/\./}" -ge "${RHCOS_MINIMUM_VERSION/\./}" ]; then
# FIXME test RHEL_VERSION instead, but we need to fix the release package for that
RHCOS_RHEL_85_OCP_VERSION="4.11"
if [ "${VERSION_ID/\./}" -ge "${RHCOS_RHEL_85_OCP_VERSION/\./}" ]; then
echo "Using defaults"
elif [ "${VERSION_ID/\./}" -ge "${RHCOS_MINIMUM_VERSION/\./}" ]; then
EXPECTED_INITRD_NETWORK_CFG=$EXPECTED_INITRD_NETWORK_CFG2
EXPECTED_REALROOT_NETWORK_CFG=$EXPECTED_REALROOT_NETWORK_CFG1
else
Expand Down