saltstack-formulas / haproxy-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
28 stars 122 forks source link

feat(httpchecks): support multiple httpcheck lines #86

Closed ze42 closed 2 years ago

ze42 commented 2 years ago

httpcheck was a single value, and required to be a single string Allow httpchecks (with an s, like other such options) to be a list to repeat the option

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

httpcheck was a single value, and required to be a single string. But the documentation and example often place multiple such lines.

Allow httpchecks (with an s, like other such options) to be a list to repeat the option

Pillar / config required to test the proposed changes

Any that would replace httpcheck by httpchecks and possibly with multiple lines. (in listeners, or backend).

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

myii commented 2 years ago

Thanks for this PR, @ze42.

Looking at the test setup, unfortunately we're only testing the basics of the haproxy.cfg file:

https://github.com/saltstack-formulas/haproxy-formula/blob/b3f0d86cc22628c9e269fa9fcd191e6630a9bd7c/test/integration/default/controls/config.rb#L5-L10

Meaning, there's no testing of the actual file contents.

Furthermore, I didn't see any examples of httpcheck in the pillar.example or test pillars.

I decided that we should have values for both httpcheck and httpchecks in the pillar files, so that the code is being tested, at the very least (while not being verified). I've added that commit to this PR.

Used these sources when looking for appropriate values to use:

myii commented 2 years ago

Merged, thanks @ze42.

saltstack-formulas-travis commented 2 years ago

:tada: This PR is included in version 0.18.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: