Update check_password function for newer RabbitMQ versions.#56193
Merged
dwoz merged 10 commits intosaltstack:masterfrom Apr 11, 2020
Merged
Update check_password function for newer RabbitMQ versions.#56193dwoz merged 10 commits intosaltstack:masterfrom
dwoz merged 10 commits intosaltstack:masterfrom
Conversation
Bring fork up to date
Newer versions of RabbitMQ have a differing output to older versions that breaks the search regex in the check_password function. This caused rabbitmq_user states to fail. This adds a check for the new status output as well, so the function will work for all versions of RabbitMQ.
DmitryKuzmenko
previously approved these changes
Apr 6, 2020
Contributor
|
@11chrisadams11 Could you please add a test case for it? |
Add unit tests to verify older and newer versions of RabbitMQ are both working.
Contributor
Author
|
@DmitryKuzmenko Added test cases for the different versions. |
DmitryKuzmenko
approved these changes
Apr 10, 2020
Contributor
|
Perfect! Thank you for updating this with tests. I've blackened the code now tests should be green. Let's wait for ci. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Newer versions of RabbitMQ have a differing output to older versions that breaks the search regex in the check_password function. This caused rabbitmq_user states to fail. This PR adds a check for the new status output as well, so the function will work for all versions of RabbitMQ.
What issues does this PR fix or reference?
Follow up to #33588
Fixes issues #56258 & #55376
Previous Behavior
The check_password function would only search the regex against the status output of older versions of RabbitMQ, which would cause errors on newer versions of RabbitMQ.
New Behavior
The check_password function will now search for the regex of the status output for both new and old versions of RabbitMQ.
Tests written?
Yes
Commits signed with GPG?
No