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

Add EL8 support and claim compatibility #527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions data/os/RedHat/8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
corosync::config_validate_cmd: "/usr/sbin/corosync -c % -t"

3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7"
"7",
"8"
]
},
{
Expand Down
27 changes: 21 additions & 6 deletions spec/classes/corosync_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
)
end

it 'validates the corosync configuration' do
is_expected.to contain_file('/etc/corosync/corosync.conf').with_validate_cmd(
'/usr/bin/env COROSYNC_MAIN_CONFIG_FILE=% /usr/sbin/corosync -t'
)
end

context 'validates the corosncy configuration when config_validate_cmd is set' do
let(:params) do
super().merge(
Expand Down Expand Up @@ -725,6 +719,27 @@

it_configures 'corosync'

# Check the correct validation command is used for each OS
it 'validates the corosync configuration' do
case os_facts[:os]['family']
when 'RedHat'
case os_facts[:os]['release']['major']
when '8'
is_expected.to contain_file('/etc/corosync/corosync.conf').with_validate_cmd(
'/usr/sbin/corosync -c % -t'
)
else
is_expected.to contain_file('/etc/corosync/corosync.conf').with_validate_cmd(
'/usr/bin/env COROSYNC_MAIN_CONFIG_FILE=% /usr/sbin/corosync -t'
)
end
else
is_expected.to contain_file('/etc/corosync/corosync.conf').with_validate_cmd(
'/usr/bin/env COROSYNC_MAIN_CONFIG_FILE=% /usr/sbin/corosync -t'
)
end
end

# Check default package installations per platform
case os_facts[:os]['family']
when 'RedHat'
Expand Down