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

Drop EoL RedHat 7 support #673

Merged
merged 4 commits into from
Oct 29, 2024
Merged
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
9 changes: 0 additions & 9 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Fedora 30

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Fedora 31

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Fedora 32

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system FreeBSD 11

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system FreeBSD 12
"name": "puppet-consul",
"version": "8.1.1-rc0",
"author": "Vox Pupuli",
Expand Down Expand Up @@ -44,7 +44,6 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11",
"12"
]
Expand Down Expand Up @@ -74,7 +73,6 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7",
"8",
"9"
]
Expand All @@ -93,13 +91,6 @@
"9"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"7",
"8"
]
},
{
"operatingsystem": "SLED",
"operatingsystemrelease": [
Expand Down
37 changes: 11 additions & 26 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
require 'spec_helper'

describe 'consul' do
on_supported_os.each do |os, facts|
next unless facts[:kernel] == 'Linux'
on_supported_os.each do |os, os_facts|
next unless os_facts[:kernel] == 'Linux'

puts "on #{os}"
context "on #{os}" do
provider = case facts[:os]['family']
when 'Archlinux'
{ service_provider: 'systemd' }
when 'Debian'
{ service_provider: 'systemd' }
when 'RedHat'
{ service_provider: 'systemd' }
when 'windows'
{ service_provider: 'unmanaged' }
when 'FreeBSD'
{ service_provider: 'freebsd' }
else
{ service_provider: 'systemd' }
end
facts = facts.merge(provider)
let(:facts) do
facts
os_facts
end

it { is_expected.to compile.with_all_deps }
Expand Down Expand Up @@ -82,7 +67,7 @@
}
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'Debian'
it { is_expected.not_to contain_apt__source('HashiCorp') }
when 'RedHat'
Expand All @@ -98,7 +83,7 @@
}
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'Debian'
it { is_expected.not_to contain_apt__source('HashiCorp') }
when 'RedHat'
Expand All @@ -107,15 +92,15 @@
end

# hashicorp repo is not supported on Arch Linux/SLES
context 'When asked to manage the repo and to install as package', unless: %w[Archlinux SLES Suse].include?(facts[:os]['family']) do
context 'When asked to manage the repo and to install as package', unless: %w[Archlinux SLES Suse].include?(os_facts[:os]['family']) do
let(:params) do
{
install_method: 'package',
manage_repo: true
}
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'Debian'
it { is_expected.to contain_apt__source('HashiCorp') }
when 'RedHat'
Expand Down Expand Up @@ -181,9 +166,9 @@

context 'When installing by archive via URL and current version is already installed' do
let(:facts) do
facts.merge({
consul_version: '1.16.3'
})
os_facts.merge({
consul_version: '1.16.3'
})
end

it { is_expected.to contain_archive('/opt/consul/archives/consul-1.16.3.zip').with(source: 'https://releases.hashicorp.com/consul/1.16.3/consul_1.16.3_linux_amd64.zip') }
Expand Down Expand Up @@ -606,7 +591,7 @@
it { is_expected.not_to contain_file('/etc/systemd/system/consul.service') }
end

case facts[:os]['family']
case os_facts[:os]['family']
when 'RedHat', 'Archlinux', 'Debian'
context 'On a modern OS' do
it { is_expected.to contain_class('consul').with_init_style('systemd') }
Expand Down