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

Added Status Code Lists for HTTP Query State #55145

Merged
merged 6 commits into from Dec 26, 2019
Merged

Added Status Code Lists for HTTP Query State #55145

merged 6 commits into from Dec 26, 2019

Conversation

Ajnbro
Copy link
Contributor

@Ajnbro Ajnbro commented Oct 28, 2019

What does this PR do?

This PR allows for individuals to pass a list of strings representing multiple different status codes to the HTTP State for querying in order to check if any of the provided status codes are returned by the query. It also creates two additional tests for the HTTP Query State, one for testing this new functionality and one for testing prior functionality. Repost of #55132 because I had opened the PR against the develop branch initially.

What issues does this PR fix or reference?

N/A

Previous Behavior

HTTP Query only allowed individuals to specify the status parameter as a string representing a status code or as a regex used to search for specific status codes.

New Behavior

HTTP Query allows individuals to specify the status parameter as a string representing a status code, a list of strings representing multiple status codes, or as a regex used to search for specific status codes.

Tests written?

Yes

Commits signed with GPG?

Yes

@Ajnbro Ajnbro requested a review from as a code owner Oct 28, 2019
@ghost ghost requested a review from twangboy Oct 28, 2019
dwoz
dwoz approved these changes Dec 26, 2019
Copy link
Contributor

@dwoz dwoz left a comment

@Ajnbro This would be a good case to start refactoring things into smaller checks. If the match and status checks were individual methods, they could be more easily unit tested without having to mock the http response. If you have some time to dedicated to this, it would be fantastic.

Otherwise, approved for now.

@dwoz dwoz merged commit 29d390d into saltstack:master Dec 26, 2019
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants