Skip to content

Commit 74f2943

Browse files
(CAT-7110) Add CentOS 9 support
- Also install kmod (depmod command) in CentOS 9 as it doesn't come pre-intalled.
1 parent 69aac41 commit 74f2943

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

metadata.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"operatingsystem": "CentOS",
2727
"operatingsystemrelease": [
2828
"7",
29-
"8"
29+
"8",
30+
"9"
3031
]
3132
},
3233
{

spec/spec_helper_acceptance_local.rb

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def iptables_version
4242
def pre_setup
4343
LitmusHelper.instance.run_shell('mkdir -p /lib/modules/`uname -r`')
4444
LitmusHelper.instance.run_shell('yum install module-init-tools -y') if fetch_os_name == 'rocky'
45+
LitmusHelper.instance.run_shell('dnf install -y kmod') if fetch_os_name == 'centos' && fetch_os_version == '9'
4546
LitmusHelper.instance.run_shell('depmod -a')
4647
end
4748

@@ -54,6 +55,10 @@ def fetch_os_name
5455
@fetch_os_name ||= LitmusHelper.instance.run_shell('facter os.name').stdout.delete("\n").downcase
5556
end
5657

58+
def fetch_os_version
59+
@fetch_os_name ||= LitmusHelper.instance.run_shell('facter os.release.full').stdout.delete("\n")
60+
end
61+
5762
RSpec.configure do |c|
5863
# This flag is disabling test 'condition' from firewall_attributes_exceptions
5964
# because this test is failing on docker containers, but it's compatible with vmpooler machines

0 commit comments

Comments
 (0)