]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
[MODULES-4234] Move physdev_is_in and physdev_is_out tests
authorWilson McCoubrey <wilson@puppet.com>
Mon, 13 Mar 2017 08:41:47 +0000 (08:41 +0000)
committerWilson McCoubrey <wilson@puppet.com>
Mon, 13 Mar 2017 08:41:47 +0000 (08:41 +0000)
To block of 'ip6tables physdev tests' which do not run on EL5 or SLES 10.

spec/acceptance/firewall_bridging_spec.rb

index 608e0e9b4587ac0ef2d4ce43bb4398c495accdf6..be09614d31e2cfc900cc0628557bfdbbc4701f1b 100644 (file)
@@ -364,12 +364,10 @@ describe 'firewall bridging' do
              end
           end
         end
-      end
-    end
 
-    context 'physdev_is_in' do
-      it 'applies' do
-        pp = <<-EOS
+        context 'physdev_is_in' do
+          it 'applies' do
+            pp = <<-EOS
           class { '::firewall': }
           firewall { '708 - test':
             provider => 'ip6tables',
@@ -379,22 +377,22 @@ describe 'firewall bridging' do
             action => accept,
             physdev_is_in => true,
           }
-        EOS
+            EOS
 
-        apply_manifest(pp, :catch_failures => true)
-        apply_manifest(pp, :catch_changes => do_catch_changes)
-      end
+            apply_manifest(pp, :catch_failures => true)
+            apply_manifest(pp, :catch_changes => do_catch_changes)
+          end
 
-      it 'should contain the rule' do
-         shell('ip6tables-save') do |r|
-           expect(r.stdout).to match(/-A FORWARD -p tcp -m physdev\s+--physdev-is-in -m multiport --ports 708 -m comment --comment "708 - test" -j ACCEPT/)
-         end
-      end
-    end
+          it 'should contain the rule' do
+            shell('ip6tables-save') do |r|
+              expect(r.stdout).to match(/-A FORWARD -p tcp -m physdev\s+--physdev-is-in -m multiport --ports 708 -m comment --comment "708 - test" -j ACCEPT/)
+            end
+          end
+        end
 
-    context 'physdev_is_out' do
-      it 'applies' do
-        pp = <<-EOS
+        context 'physdev_is_out' do
+          it 'applies' do
+            pp = <<-EOS
           class { '::firewall': }
           firewall { '709 - test':
             provider => 'ip6tables',
@@ -404,16 +402,18 @@ describe 'firewall bridging' do
             action => accept,
             physdev_is_out => true,
           }
-        EOS
+            EOS
 
-        apply_manifest(pp, :catch_failures => true)
-        apply_manifest(pp, :catch_changes => do_catch_changes)
-      end
+            apply_manifest(pp, :catch_failures => true)
+            apply_manifest(pp, :catch_changes => do_catch_changes)
+          end
 
-      it 'should contain the rule' do
-         shell('ip6tables-save') do |r|
-           expect(r.stdout).to match(/-A FORWARD -p tcp -m physdev\s+--physdev-is-out -m multiport --ports 709 -m comment --comment "709 - test" -j ACCEPT/)
-         end
+          it 'should contain the rule' do
+            shell('ip6tables-save') do |r|
+              expect(r.stdout).to match(/-A FORWARD -p tcp -m physdev\s+--physdev-is-out -m multiport --ports 709 -m comment --comment "709 - test" -j ACCEPT/)
+            end
+          end
+        end
       end
-    end
+  end
 end