]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Comment out spec test for el7 due to unknown interface name
authorJonathan Tripathy <jt@puppetlabs.com>
Tue, 16 Jun 2015 13:03:13 +0000 (14:03 +0100)
committerJonathan Tripathy <jt@puppetlabs.com>
Wed, 17 Jun 2015 16:21:10 +0000 (17:21 +0100)
spec/acceptance/firewall_clusterip_spec.rb

index 46b4b5aeebd74bfbd36295d32c6edc2531131dd1..1340f0f57a281bdf45bdb05465ebbeac32e8148a 100644 (file)
@@ -7,34 +7,41 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami
     shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush')
   end
 
-    describe 'clusterip' do
-      context 'cluster ipv4 test' do
-        it 'applies' do
-          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
+    # Have to comment out el-7 as the interface name is inconsistent
+    if default['platform'] !~ /el-7/
+      describe 'clusterip' do
+        context 'cluster ipv4 test' do
+          it 'applies' do
+            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
-          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
+            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
+    else
+      pending("MODULES-2124 should be resolved for clusterip RHEL7 support") do
+        true.should be(true)
+      end
     end
 end