Skip to content

Commit d5a0cb7

Browse files
author
Morgan Haskel
committed
Merge pull request #544 from jonnytpuppet/clusterip
Comment out spec test for el7 due to unknown interface name
2 parents 5e2bef1 + cae1f72 commit d5a0cb7

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

spec/acceptance/firewall_clusterip_spec.rb

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,41 @@
77
shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush')
88
end
99

10-
describe 'clusterip' do
11-
context 'cluster ipv4 test' do
12-
it 'applies' do
13-
pp = <<-EOS
14-
class { '::firewall': }
15-
firewall {
16-
'830 - clusterip test':
17-
chain => 'FORWARD',
18-
jump => 'CLUSTERIP',
19-
destination => '1.1.1.1',
20-
iniface => 'eth0',
21-
clusterip_new => true,
22-
clusterip_hashmode => "sourceip",
23-
clusterip_clustermac => "01:00:5E:00:00:00",
24-
clusterip_total_nodes => "2",
25-
clusterip_local_node => "1",
26-
clusterip_hash_init => "1337",
27-
}
28-
EOS
10+
# Have to comment out el-7 as the interface name is inconsistent
11+
if default['platform'] !~ /el-7/
12+
describe 'clusterip' do
13+
context 'cluster ipv4 test' do
14+
it 'applies' do
15+
pp = <<-EOS
16+
class { '::firewall': }
17+
firewall {
18+
'830 - clusterip test':
19+
chain => 'FORWARD',
20+
jump => 'CLUSTERIP',
21+
destination => '1.1.1.1',
22+
iniface => 'eth0',
23+
clusterip_new => true,
24+
clusterip_hashmode => "sourceip",
25+
clusterip_clustermac => "01:00:5E:00:00:00",
26+
clusterip_total_nodes => "2",
27+
clusterip_local_node => "1",
28+
clusterip_hash_init => "1337",
29+
}
30+
EOS
2931

30-
apply_manifest(pp, :catch_failures => true)
31-
end
32+
apply_manifest(pp, :catch_failures => true)
33+
end
3234

33-
it 'should contain the rule' do
34-
shell('iptables-save') do |r|
35-
expect(r.stdout).to match(/-A FORWARD -d (1.1.1.1\/32|1.1.1.1) -i eth0 -p tcp -m comment --comment "830 - clusterip test" -j CLUSTERIP --new --hashmode sourceip --clustermac 01:00:5E:00:00:00 --total-nodes 2 --local-node 1 --hash-init 1337/)
35+
it 'should contain the rule' do
36+
shell('iptables-save') do |r|
37+
expect(r.stdout).to match(/-A FORWARD -d (1.1.1.1\/32|1.1.1.1) -i eth0 -p tcp -m comment --comment "830 - clusterip test" -j CLUSTERIP --new --hashmode sourceip --clustermac 01:00:5E:00:00:00 --total-nodes 2 --local-node 1 --hash-init 1337/)
38+
end
3639
end
3740
end
3841
end
42+
else
43+
pending("MODULES-2124 should be resolved for clusterip RHEL7 support") do
44+
true.should be(true)
45+
end
3946
end
4047
end

0 commit comments

Comments
 (0)