Fixup the unit.client_test.LocalClientTestCase.test_cmd_subset from #35720 #35753
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?
The bug fix for #20575, which is located in PR #35720, caused a test failure in the unit.client_test tests that wasn't caught until later. This PR fixes that test.
Background information on why I am fixing it this way, after confirming with @thatch45 :
ret
option in this function actually stands forreturner
and should just be a pass-through and not overwritten in thecmd_subset
function as was originally occurring in the function before the fix in fix 20575, make subset really return random subset #35720. Therefore, the expected return in this unit test should beret=''
.cmd_subset
function actually returns a random subset of minions, sometimes thesub=1
function operates onminion2
and sometimes it isminion1
. The same goes for the list of minions forsub=10
. Since this assert is against a list, sometimes the list of minions will be called in differing orders.What issues does this PR fix or reference?
Refs #35720
Previous Behavior
Test failing on 2016.3 branch.
New Behavior
Test will pass now.
Tests written?
Yes
Please review Salt's Contributing Guide for best practices.