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 integration.modules.test_state
for Windows
#45308
Conversation
8fe44cf
to
dfe91b6
Compare
salt/states/file.py
Outdated
deny_perms=win_deny_perms, | ||
inheritance=win_inheritance, | ||
reset=win_perms_reset) | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section of code would be cleaner if you encompassed just the file.check_perms
command in the try/except instead of the if is_windows
check as well.
@twangboy I can do the backport once this is ready. This is causing a test failure, however: https://jenkins.saltstack.com/job/PR/job/salt-pr-linode-ubuntu14-n/18415/ Can you take a look? |
Fixes the following tests: - test_get_file_from_env_in_top_match - test_issue_1896_file_append_source - test_state_sls_id_test Fixes in issue in file.managed where a command execution error was being raised if the target file did not exist.
dfe91b6
to
0be187c
Compare
integration.modules.test_state
for Windowsunit.states.test_file
for Windows
unit.states.test_file
for Windowsintegration.modules.test_state
for Windows
- Fix problem with invalid characters in requisites.prereq_simple2 - Fix problem with true/false commands in Windows. Need to use exit - Fix some issues with hard-coded paths to /tmp
@rallytime This should fix the failing linux test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done
@twangboy This isn't back-porting cleanly. Can you make a separate PR for this against 2107.7? |
Backport changes from #45308
What does this PR do?
Fixes failing tests on Windows
test_state
prereq_simple2
state file that had somestrange characters that were causing failure in windows (
<C2><A0>
)watch_any
to handle WindowsFixes an issue in
file.managed
where a command execution error wasbeing raised if the target file did not exist.
@rallytime Need to backport this to 2017.7. Should I do a separate PR?
What issues does this PR fix or reference?
saltstack/salt-ci-images#439
Tests written?
Yes
Commits signed with GPG?
Yes