Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-5340) Understand negated match sets #713

Merged
merged 1 commit into from
Aug 16, 2017

Conversation

nbarrientos
Copy link
Contributor

This patch allows the provider to understand rules that contain negated
match sets when parsing the ruleset.

@eputnam
Copy link
Contributor

eputnam commented Aug 8, 2017

@nbarrientos
Copy link
Contributor Author

Sure. Watch this space :)

This patch allows the provider to understand rules that contain negated
match sets when parsing the ruleset.
@nbarrientos
Copy link
Contributor Author

@eputnam there you go! 😃

@nbarrientos
Copy link
Contributor Author

The test does not pass on master:

  1) iptables provider when converting rules to resources for test data 'ipset_negated' the parameter 'chain' should match "PREROUTING"
     Failure/Error: expect(resource[param_name]).to eq(data[:params][param_name])
     
       expected: "PREROUTING"
            got: "tcp"
     
       (compared using ==)
     # ./spec/unit/puppet/provider/iptables_spec.rb:232:in `block (6 levels) in <top (required)>'

  2) iptables provider when converting rules to resources for test data 'ipset_negated' the parameter 'proto' should match "tcp"
     Failure/Error: expect(resource[param_name]).to eq(data[:params][param_name])
     
       expected: "tcp"
            got: "1094"
     
       (compared using ==)
     # ./spec/unit/puppet/provider/iptables_spec.rb:232:in `block (6 levels) in <top (required)>'

  3) iptables provider when converting rules to resources for test data 'ipset_negated' the parameter 'dport' should match ["1094"]
     Failure/Error: expect(resource[param_name]).to eq(data[:params][param_name])
     
       expected: ["1094"]
            got: ["060 ipset"]
     
       (compared using ==)
     # ./spec/unit/puppet/provider/iptables_spec.rb:232:in `block (6 levels) in <top (required)>'

  4) iptables provider when converting rules to resources for test data 'ipset_negated' the parameter 'state' should match ["NEW"]
     Failure/Error: expect(resource[param_name]).to eq(data[:params][param_name])
     
       expected: ["NEW"]
            got: ["! setname1"]
     
       (compared using ==)
     # ./spec/unit/puppet/provider/iptables_spec.rb:232:in `block (6 levels) in <top (required)>'

  5) iptables provider when converting rules to resources for test data 'ipset_negated' the parameter 'ipset' should match ["! setname1 src"]
     Failure/Error: expect(resource[param_name]).to eq(data[:params][param_name])
     
       expected: ["! setname1 src"]
            got: ["src"]
     
       (compared using ==)
     # ./spec/unit/puppet/provider/iptables_spec.rb:232:in `block (6 levels) in <top (required)>'

So we should be good to go now.

@nbarrientos
Copy link
Contributor Author

Ping @eputnam

@eputnam eputnam merged commit 748377d into puppetlabs:master Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants