diff options
| author | Tim Meusel <tim@bastelfreak.de> | 2019-09-12 10:31:25 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-12 10:31:25 +0200 | 
| commit | 1a417a652142302fdd62534a0d5220c8b7b2304d (patch) | |
| tree | 397bcfd1f98200da896b8d032cbd4b9bcb1a3749 /spec/defines/rule_spec.rb | |
| parent | 6d96e030be0db4a916dd6a9bd0b25570d359e634 (diff) | |
| parent | 3d868fb81532d717fd625638781e4663a834260c (diff) | |
| download | puppet-ferm-1a417a652142302fdd62534a0d5220c8b7b2304d.tar.gz puppet-ferm-1a417a652142302fdd62534a0d5220c8b7b2304d.tar.bz2 | |
Merge pull request #67 from foxxx0/allow-proto-array
allow using an array for $proto
Diffstat (limited to 'spec/defines/rule_spec.rb')
| -rw-r--r-- | spec/defines/rule_spec.rb | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/spec/defines/rule_spec.rb b/spec/defines/rule_spec.rb index ef20e17..33ce169 100644 --- a/spec/defines/rule_spec.rb +++ b/spec/defines/rule_spec.rb @@ -114,6 +114,25 @@ describe 'ferm::rule', type: :define do          it { is_expected.to contain_concat__fragment('INPUT-eth0-zzz').with_content("}\n") }        end +      context 'without a specific interface using array for proto' do +        let(:title) { 'filter-consul' } +        let :params do +          { +            chain: 'INPUT', +            action: 'ACCEPT', +            proto: %w[tcp udp], +            dport: '(8301 8302)', +            saddr: '127.0.0.1' +          } +        end + +        it { is_expected.to compile.with_all_deps } +        it { is_expected.to contain_concat__fragment('INPUT-filter-consul').with_content("mod comment comment 'filter-consul' proto (tcp udp) dport (8301 8302) saddr @ipfilter((127.0.0.1)) ACCEPT;\n") } +        it { is_expected.to contain_concat__fragment('filter-INPUT-config-include') } +        it { is_expected.to contain_concat__fragment('filter-FORWARD-config-include') } +        it { is_expected.to contain_concat__fragment('filter-OUTPUT-config-include') } +      end +        context 'with jumping to custom chains' do          # create custom chain          let(:pre_condition) do | 
