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-8539) Added 'accepted_payload_size' to resolver #346

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

genebean
Copy link

This paramter is defined in the HAProxy docs at
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.3.2-accepted_payload_size
but was missing from this module. This commit adds
the ability to set the accepted_payload_size

@genebean genebean changed the title Added 'accepted_payload_size' to resolver (MODULES-8539) Added 'accepted_payload_size' to resolver Jan 24, 2019
@david22swan
Copy link
Member

screen shot 2019-01-25 at 10 39 53 am

@david22swan
Copy link
Member

LGTM but I would like a test to trigger the error.

@genebean
Copy link
Author

@david22swan I just pushed an update with tests on each side of the bounds for accepted_payload_size. When run locally they produce this:

╔ ☕️  gene:~/repos/genebean-puppetlabs-haproxy (resolver ✔)
╚ᐅ pdk bundle exec rspec --force-color spec/defines/resolver_spec.rb
pdk (INFO): Using Ruby 2.5.1
pdk (INFO): Using Puppet 6.0.2

haproxy::resolver
  with two resolvers
    should contain Concat::Fragment[haproxy-bar_resolver_block] with order => "20-bar-01", target => "/etc/haproxy/haproxy.cfg" and content  supplied string
  with accepted_payload_size too small
    should fail to compile and raise an error matching /accepted_payload_size must be atleast 512 and not more than 8192/
  with accepted_payload_size too large
    should fail to compile and raise an error matching /accepted_payload_size must be atleast 512 and not more than 8192/

1 deprecation warning total

Finished in 3.48 seconds (files took 3.24 seconds to load)
3 examples, 0 failures

@david22swan
Copy link
Member

david22swan commented Jan 25, 2019

@genebean Your new test's are throwing rubocop exceptions. You need to put %{ } around the regex not / /.

This paramter is defined in the HAProxy docs at
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.3.2-accepted_payload_size
but was missing from this module. This commit adds
the ability to set the accepted_payload_size
@genebean
Copy link
Author

Let's see if this fixes that @david22swan

@david22swan
Copy link
Member

LGTM

@david22swan david22swan merged commit 544f4eb into puppetlabs:master Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants