|
7 | 7 | shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush') |
8 | 8 | end |
9 | 9 |
|
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 |
29 | 31 |
|
30 | | - apply_manifest(pp, :catch_failures => true) |
31 | | - end |
| 32 | + apply_manifest(pp, :catch_failures => true) |
| 33 | + end |
32 | 34 |
|
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 |
36 | 39 | end |
37 | 40 | end |
38 | 41 | end |
| 42 | + else |
| 43 | + pending("MODULES-2124 should be resolved for clusterip RHEL7 support") do |
| 44 | + true.should be(true) |
| 45 | + end |
39 | 46 | end |
40 | 47 | end |
0 commit comments