Skip to content

Commit ae46631

Browse files
rajat-puppetRamesh7
authored andcommitted
Removing RedHat/Scientific/OracleLinux 6
1 parent 0647299 commit ae46631

File tree

6 files changed

+5
-85
lines changed

6 files changed

+5
-85
lines changed

spec/acceptance/firewall_attributes_exceptions_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919

2020
# --bytecode is only supported by operatingsystems using nftables (in general Linux kernel 3.13, RedHat 7 (and derivates) with 3.10)
2121
# Skipping those from which we know they would fail.
22-
describe 'bytecode property', unless: (os[:family] == 'redhat' && os[:release][0] <= '6') ||
23-
(os[:family] == 'sles' && os[:release][0..1] <= '11') ||
24-
(fetch_os_name == 'oraclelinux' && os[:release][0] <= '7') ||
22+
describe 'bytecode property', unless: (fetch_os_name == 'oraclelinux' && os[:release][0] == '7') ||
2523
(os[:family] == 'ubuntu') do
2624
describe 'bytecode' do
2725
context 'when 4,48 0 0 9,21 0 1 6,6 0 0 1,6 0 0 0' do

spec/acceptance/firewall_attributes_ipv6_exceptions_spec.rb

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -86,29 +86,6 @@ class { '::firewall': }
8686
end
8787
end
8888
end
89-
90-
context 'when multiple addrtype fail', if: (os[:family] == 'redhat' && os[:release].start_with?('5')) do
91-
pp = <<-PUPPETCODE
92-
class { '::firewall': }
93-
firewall { '616 - test':
94-
proto => tcp,
95-
jump => accept,
96-
#{type} => ['LOCAL', '! LOCAL'],
97-
protocol => 'IPv6',
98-
}
99-
PUPPETCODE
100-
it 'fails' do
101-
apply_manifest(pp, expect_failures: true) do |r|
102-
expect(r.stderr).to match(%r{Multiple #{type} elements are available from iptables version})
103-
end
104-
end
105-
106-
it 'does not contain the rule' do
107-
run_shell('ip6tables-save') do |r|
108-
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})
109-
end
110-
end
111-
end
11289
end
11390
end
11491

@@ -139,61 +116,6 @@ class { '::firewall': }
139116
end
140117
end
141118

142-
# ipset is hard to test, only testing on ubuntu 14
143-
describe 'ipset', if: (os[:family] == 'redhat' && os[:release].start_with?('14')) do
144-
before(:all) do
145-
pp = <<-PUPPETCODE
146-
exec { 'hackery pt 1':
147-
command => 'service iptables-persistent flush',
148-
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
149-
}
150-
package { 'ipset':
151-
ensure => present,
152-
require => Exec['hackery pt 1'],
153-
}
154-
exec { 'hackery pt 2':
155-
command => 'service iptables-persistent start',
156-
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
157-
require => Package['ipset'],
158-
}
159-
class { '::firewall': }
160-
exec { 'create ipset blacklist':
161-
command => 'ipset create blacklist hash:ip,port family inet6 maxelem 1024 hashsize 65535 timeout 120',
162-
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
163-
require => Package['ipset'],
164-
}
165-
-> exec { 'create ipset honeypot':
166-
command => 'ipset create honeypot hash:ip family inet6 maxelem 1024 hashsize 65535 timeout 120',
167-
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
168-
}
169-
-> exec { 'add blacklist':
170-
command => 'ipset add blacklist 2001:db8::1,80',
171-
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
172-
}
173-
-> exec { 'add honeypot':
174-
command => 'ipset add honeypot 2001:db8::5',
175-
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
176-
}
177-
firewall { '612 - test':
178-
ensure => present,
179-
chain => 'INPUT',
180-
proto => tcp,
181-
jump => drop,
182-
ipset => ['blacklist src,dst', '! honeypot dst'],
183-
protocol => 'IPv6',
184-
require => Exec['add honeypot'],
185-
}
186-
PUPPETCODE
187-
apply_manifest(pp, catch_failures: true)
188-
end
189-
190-
it 'contains the rule' do
191-
run_shell('ip6tables-save') do |r|
192-
expect(r.stdout).to match(%r{-A INPUT -p (tcp|6) -m set --match-set blacklist src,dst -m set ! --match-set honeypot dst -m comment --comment "612 - test" -j DROP})
193-
end
194-
end
195-
end
196-
197119
describe 'src_range' do
198120
context 'when 2001::db8::1-2001:db8::ff' do
199121
pp = <<-PUPPETCODE

spec/acceptance/firewall_attributes_ipv6_happy_path_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper_acceptance'
44

5-
describe 'firewall attribute testing, happy path', unless: (os[:family] == 'redhat' && os[:release].start_with?('5', '6')) || (os[:family] == 'sles') do
5+
describe 'firewall attribute testing, happy path', unless: (os[:family] == 'sles') do
66
before :all do
77
iptables_flush_all_tables
88
ip6tables_flush_all_tables

spec/acceptance/resource_cmd_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
end
8686
end
8787

88-
context 'when accepts rules with multiple comments', unless: (os[:family] == 'redhat' && os[:release].start_with?('5')) do
88+
context 'when accepts rules with multiple comments' do
8989
before(:all) do
9090
iptables_flush_all_tables
9191
run_shell('iptables -A INPUT -j ACCEPT -p tcp --dport 80 -m comment --comment "http" -m comment --comment "http"')

spec/spec_helper_acceptance_local.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def fetch_os_name
6262
c.before :suite do
6363
# Depmod is not availible by default on our AlmaLinux/CentOS 8 docker image
6464
LitmusHelper.instance.run_shell('yum install kmod -y') if ['almalinux-8', 'centos-8'].include?("#{fetch_os_name}-#{os[:release].to_i}")
65-
if ['centos-6', 'centos-7', 'oraclelinux-6', 'scientific-6', 'scientific-7'].include?("#{fetch_os_name}-#{os[:release].to_i}")
65+
if ['centos-7', 'scientific-7'].include?("#{fetch_os_name}-#{os[:release].to_i}")
6666
LitmusHelper.instance.run_shell('yum update -y')
6767
LitmusHelper.instance.run_shell('depmod -a')
6868
['filter', 'nat', 'mangle', 'raw'].each do |t|

spec/unit/classes/firewall_linux_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
describe 'firewall::linux', type: :class do
66
['RedHat', 'CentOS'].each do |os|
77
context "with Redhat Like: operatingsystem => #{os}" do
8-
releases = ['6', '7', '8']
8+
releases = ['7', '8']
99
releases.each do |osrel|
1010
context "when operatingsystemrelease => #{osrel}" do
1111
let(:facts) do

0 commit comments

Comments
 (0)