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

Fix `test_state` for Windows #50290

Merged
merged 3 commits into from Oct 31, 2018

Conversation

Projects
None yet
3 participants
@twangboy
Copy link
Contributor

commented Oct 29, 2018

What does this PR do?

Fixes the following state on Windows:
integration.modules.test_state.StateModuleTest.test_onchanges_requisite_no_state_module

The atomicfile close method was using shutil.copymode to copy permissions from the original file to the new one. This is useless in Windows. It was also crashing because one of the users specified in the security descriptor didn't exist on the machine.

This PR creates a salt util that will copy the Security information correctly. This salt util is then used in place of shutil.copymode on Windows.

What issues does this PR fix or reference?

Found in branch tests for 2018.3

Tests written?

No

Commits signed with GPG?

Yes

@salt-jenkins salt-jenkins requested a review from saltstack/team-windows Oct 29, 2018

@dwoz

dwoz approved these changes Oct 29, 2018

Copy link
Contributor

left a comment

LGTM

@cachedout cachedout merged commit af1075b into saltstack:2018.3 Oct 31, 2018

7 of 10 checks passed

jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has failed
Details
continuous-integration/jenkins/pr-merge This commit is being built
Details
WIP Ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details

@twangboy twangboy deleted the twangboy:fix_test_state branch Dec 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.