Skip to content

Commit

Permalink
Merge pull request #546 from jonnytpuppet/clusterip
Browse files Browse the repository at this point in the history
Excluding SLES from CLUSTERIP tests.
  • Loading branch information
DavidS committed Jun 18, 2015
2 parents d529b61 + c07c10e commit e6bdc85
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions spec/acceptance/firewall_clusterip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,37 @@
shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush')
end

# Have to comment out el-7 as the interface name is inconsistent
describe 'clusterip' do
context 'cluster ipv4 test' do
it 'applies' do
pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
pp = <<-EOS
class { '::firewall': }
firewall {
'830 - clusterip test':
chain => 'FORWARD',
jump => 'CLUSTERIP',
destination => '1.1.1.1',
iniface => 'eth0',
clusterip_new => true,
clusterip_hashmode => "sourceip",
clusterip_clustermac => "01:00:5E:00:00:00",
clusterip_total_nodes => "2",
clusterip_local_node => "1",
clusterip_hash_init => "1337",
}
EOS
# SLES doesn't have the CLUSTERIP module
if default['platform'] !~ /sles/
describe 'clusterip' do
context 'cluster ipv4 test' do
it 'applies' do
pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
pp = <<-EOS
class { '::firewall': }
firewall {
'830 - clusterip test':
chain => 'FORWARD',
jump => 'CLUSTERIP',
destination => '1.1.1.1',
iniface => 'eth0',
clusterip_new => true,
clusterip_hashmode => "sourceip",
clusterip_clustermac => "01:00:5E:00:00:00",
clusterip_total_nodes => "2",
clusterip_local_node => "1",
clusterip_hash_init => "1337",
}
EOS

apply_manifest(pp, :catch_failures => true)
end
apply_manifest(pp, :catch_failures => true)
end

it 'should contain the rule' do
pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
shell('iptables-save') do |r|
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/)
it 'should contain the rule' do
pending("MODULES-2124 should be resolved for clusterip RHEL7 support") if default['platform'] =~ /el-7/
shell('iptables-save') do |r|
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/)
end
end
end
end
Expand Down

0 comments on commit e6bdc85

Please sign in to comment.