Skip to content

Port #50627 to master #56770

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

Merged
merged 11 commits into from
Apr 22, 2020
Merged

Port #50627 to master #56770

merged 11 commits into from
Apr 22, 2020

Conversation

s0undt3ch
Copy link
Collaborator

What does this PR do?

See title

What issues does this PR fix or reference?

#50627

Merge requirements satisfied?

  • Tests written/updated

Commits signed with GPG?

Yes

Mattijs and others added 9 commits April 21, 2020 13:30
For making changes to files based on a key/value pair.
This commit also includes addition of an integration test to test
the new behaviour added.
It should probably have suggested salt.utils.files.fopen() since
using salt.utils.fopen() breaks when running it through the
intergration test. It did seem to work when running it as a normal
state module though.

This should fix the additional lint errors.
Something on the windows2016-py2 build is throwing in what seems
like utf-16le encoding shenanigans in somewhere, but only for the
line actually being replaced, not any of the ones already there.
This obviously (and correctly I think) fails the test.

PermitRootLogin
becomes
P\x00e\x00r\x00m\x00i\x00t\x00R\x00o\x00o\x00t\x00L\x00o\x00g\x00i\x00n\x00

Also trying to be more OS friendly by using their native line
separators.
integration.states.test_file.FileTest.test_keyvalue was already
testing the file.keyvalue function since it used file.keyvalue_list
already.

Now there is only one function; file.keyvalue which takes either
2 parameters (key, and value) or a dictionary key_values to handle
multiple key values in a single file all at once.
Left over from when this function was still part of an execution
module. It got converted when it made a lot more sense to have it
in an actual state module
@s0undt3ch s0undt3ch requested a review from a team as a code owner April 21, 2020 12:40
@ghost ghost requested review from garethgreenaway and removed request for a team April 21, 2020 12:40
@s0undt3ch s0undt3ch force-pushed the port-to-master/50627 branch from df2342c to 4e45ed1 Compare April 21, 2020 13:04
@dwoz dwoz merged commit 8cf81d5 into saltstack:master Apr 22, 2020
@s0undt3ch s0undt3ch deleted the port-to-master/50627 branch April 22, 2020 06:41
@sagetherage sagetherage added the ZRelease-Sodium retired label label May 18, 2020
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.

4 participants