Skip to content

Commit

Permalink
Removing RedHat/Scientific/OracleLinux 6
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat-puppet committed Sep 21, 2023
1 parent 0647299 commit 2e0ab50
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 31 deletions.
4 changes: 1 addition & 3 deletions spec/acceptance/firewall_attributes_exceptions_spec.rb
Expand Up @@ -19,9 +19,7 @@

# --bytecode is only supported by operatingsystems using nftables (in general Linux kernel 3.13, RedHat 7 (and derivates) with 3.10)
# Skipping those from which we know they would fail.
describe 'bytecode property', unless: (os[:family] == 'redhat' && os[:release][0] <= '6') ||
(os[:family] == 'sles' && os[:release][0..1] <= '11') ||
(fetch_os_name == 'oraclelinux' && os[:release][0] <= '7') ||
describe 'bytecode property', unless: (fetch_os_name == 'oraclelinux' && os[:release][0] == '7') ||
(os[:family] == 'ubuntu') do
describe 'bytecode' do
context 'when 4,48 0 0 9,21 0 1 6,6 0 0 1,6 0 0 0' do
Expand Down
25 changes: 1 addition & 24 deletions spec/acceptance/firewall_attributes_ipv6_exceptions_spec.rb
Expand Up @@ -86,29 +86,6 @@ class { '::firewall': }
end
end
end

context 'when multiple addrtype fail', if: (os[:family] == 'redhat' && os[:release].start_with?('5')) do
pp = <<-PUPPETCODE
class { '::firewall': }
firewall { '616 - test':
proto => tcp,
jump => accept,
#{type} => ['LOCAL', '! LOCAL'],
protocol => 'IPv6',
}
PUPPETCODE
it 'fails' do
apply_manifest(pp, expect_failures: true) do |r|
expect(r.stderr).to match(%r{Multiple #{type} elements are available from iptables version})
end
end

it 'does not contain the rule' do
run_shell('ip6tables-save') do |r|
expect(r.stdout).not_to match(%r{-A INPUT -p (tcp|6) -m addrtype --#{type.tr('_', '-')} LOCAL -m addrtype ! --#{type.tr('_', '-')} LOCAL -m comment --comment "616 - test" -j ACCEPT})
end
end
end
end
end

Expand Down Expand Up @@ -140,7 +117,7 @@ class { '::firewall': }
end

# ipset is hard to test, only testing on ubuntu 14
describe 'ipset', if: (os[:family] == 'redhat' && os[:release].start_with?('14')) do
describe 'ipset', if: (['ubuntu', 'debian'].include?(os[:family]) && os[:release].start_with?('14')) do
before(:all) do
pp = <<-PUPPETCODE
exec { 'hackery pt 1':
Expand Down
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper_acceptance'

describe 'firewall attribute testing, happy path', unless: (os[:family] == 'redhat' && os[:release].start_with?('5', '6')) || (os[:family] == 'sles') do
describe 'firewall attribute testing, happy path', unless: (os[:family] == 'sles') do
before :all do
iptables_flush_all_tables
ip6tables_flush_all_tables
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/resource_cmd_spec.rb
Expand Up @@ -85,7 +85,7 @@
end
end

context 'when accepts rules with multiple comments', unless: (os[:family] == 'redhat' && os[:release].start_with?('5')) do
context 'when accepts rules with multiple comments' do
before(:all) do
iptables_flush_all_tables
run_shell('iptables -A INPUT -j ACCEPT -p tcp --dport 80 -m comment --comment "http" -m comment --comment "http"')
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance_local.rb
Expand Up @@ -62,7 +62,7 @@ def fetch_os_name
c.before :suite do
# Depmod is not availible by default on our AlmaLinux/CentOS 8 docker image
LitmusHelper.instance.run_shell('yum install kmod -y') if ['almalinux-8', 'centos-8'].include?("#{fetch_os_name}-#{os[:release].to_i}")
if ['centos-6', 'centos-7', 'oraclelinux-6', 'scientific-6', 'scientific-7'].include?("#{fetch_os_name}-#{os[:release].to_i}")
if ['centos-7', 'scientific-7'].include?("#{fetch_os_name}-#{os[:release].to_i}")
LitmusHelper.instance.run_shell('yum update -y')
LitmusHelper.instance.run_shell('depmod -a')
['filter', 'nat', 'mangle', 'raw'].each do |t|
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/classes/firewall_linux_spec.rb
Expand Up @@ -5,7 +5,7 @@
describe 'firewall::linux', type: :class do
['RedHat', 'CentOS'].each do |os|
context "with Redhat Like: operatingsystem => #{os}" do
releases = ['6', '7', '8']
releases = ['7', '8']
releases.each do |osrel|
context "when operatingsystemrelease => #{osrel}" do
let(:facts) do
Expand Down

0 comments on commit 2e0ab50

Please sign in to comment.