]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Disable tests of CT target on Oracle and Suse Linux.
authorRobert Frank <rwf14f@gmail.com>
Tue, 3 Sep 2019 13:22:32 +0000 (14:22 +0100)
committerRobert Frank <rwf14f@gmail.com>
Tue, 3 Sep 2019 13:24:05 +0000 (14:24 +0100)
spec/acceptance/firewall_attributes_happy_path_spec.rb
spec/acceptance/firewall_attributes_ipv6_happy_path_spec.rb

index 78cc2aa7085a2652371f3d6782f847625cbdc19d..122e492b3f2ffb8a6653baf09531345c0d4d50e4 100644 (file)
@@ -504,7 +504,8 @@ describe 'firewall attribute testing, happy path' do
     end
   end
 
-  describe 'test attributes which are not available on rh5/6', unless: (os[:family] == 'redhat' && os[:release].start_with?('5', '6')) do
+  describe 'test CT target attributes which are not available on some OS', unless:
+      (os[:family] == 'redhat' && (os[:release].start_with?('5', '6') || os[:name] == 'OracleLinux')) || (os[:family] == 'Suse') do
     before(:all) do
       pp = <<-PUPPETCODE
           firewall { '1100 - ct_target tests - zone':
index a5e8a409aea5ec16838fe2c53f8335fa185cc587..7b268e648d29c6eeb2f3095b70af538e8323e2c8 100644 (file)
@@ -261,14 +261,6 @@ describe 'firewall attribute testing, happy path', unless: (os[:family] == 'redh
           proto   => all,
           provider => 'ip6tables',
         }
-        firewall { '1101 - ct_target tests - zone':
-          proto    => 'all',
-          zone     => '4000',
-          jump     => 'CT',
-          chain    => 'PREROUTING',
-          table    => 'raw',
-          provider => 'ip6tables',
-        }
       PUPPETCODE
       apply_manifest(pp, catch_failures: true)
       apply_manifest(pp, catch_changes: do_catch_changes)
@@ -374,8 +366,28 @@ describe 'firewall attribute testing, happy path', unless: (os[:family] == 'redh
         expect(result.stdout).to match(regex)
       end
     end
+  end
+
+  describe 'test CT target attributes which are not available on some OS', unless:
+      (os[:family] == 'redhat' && (os[:release].start_with?('5', '6') || os[:name] == 'OracleLinux')) || (os[:family] == 'Suse') do
+    before(:all) do
+      pp = <<-PUPPETCODE
+          firewall { '1100 - ct_target tests - zone':
+            proto => 'all',
+            zone  => '4000',
+            jump  => 'CT',
+            chain => 'PREROUTING',
+            table => 'raw',
+          }
+      PUPPETCODE
+      apply_manifest(pp, catch_failures: true)
+      apply_manifest(pp, catch_changes: do_catch_changes)
+    end
+
+    let(:result) { shell('iptables-save') }
+
     it 'zone is set' do
-      expect(result.stdout).to match(%r{-A PREROUTING -m comment --comment "1101 - ct_target tests - zone" -j CT --zone 4000})
+      expect(result.stdout).to match(%r{-A PREROUTING -m comment --comment "1100 - ct_target tests - zone" -j CT --zone 4000})
     end
   end
 end