]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
fix spurious fail, http/udp does not exist in test harness
authorKjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
Wed, 1 Dec 2021 21:31:32 +0000 (22:31 +0100)
committerKjetil Torgrim Homme <kjetil.homme@redpill-linpro.com>
Mon, 3 Oct 2022 21:03:18 +0000 (23:03 +0200)
Switch to "talk" (port 517), since that is an UDP only service in the default Debian and RedHat /etc/services.

spec/unit/puppet/provider/iptables_spec.rb

index 5aaf9b82879236a109387dce1a7bf80759adebc0..918cf64d806b22f8d0b6761a8086efb3e0dc3660 100644 (file)
@@ -331,14 +331,14 @@ describe 'iptables provider' do
                                        chain: 'nova-compute-FORWARD',
                                        source: '0.0.0.0/32',
                                        destination: '255.255.255.255/32',
-                                       sport: ['! 78', '79', 'http'],
+                                       sport: ['! 78', '79', 'talk'],
                                        dport: ['77', '! 76'],
                                        proto: 'udp')
     end
     let(:instance) { provider.new(resource) }
 
     it 'fails when not all array items are inverted' do
-      expect { instance.insert }.to raise_error RuntimeError, %r{but '79', '80' are not prefixed}
+      expect { instance.insert }.to raise_error RuntimeError, %r{but '79', '517' are not prefixed}
     end
   end