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_pydsl on Windows #53557

Merged
merged 3 commits into from Jul 5, 2019

Conversation

@twangboy
Copy link
Contributor

commented Jun 20, 2019

What does this PR do?

Fixes an issue with the test_pydsl test on Windows

This test has a hardcoded path to /tmp which doesn't exist by default on Windows. The reason for the hardcoded path is explained in the test itself.

This PR adds a setUp function to the class which adds the \tmp directory on Windows and removes it after the test run. As a result, it is now a destructive test.

It also puts the reading of \tmp\output into a try/finally block to make sure the command to delete the output file is run, even if there is a problem

Tests written?

Fixes a test

Commits signed with GPG?

Yes

Fixes an issue with the test_pydsl test on Windows

This test has a hardcoded path to `/tmp` which doesn't exist by default
on Windows. This PR adds a setUp function to the class which adds that
directory on Windows and removes it after the test run. As a result it
is now a destructive test.
@Ch3LL Ch3LL requested a review from cmcmarrow Jun 26, 2019
@twangboy twangboy self-assigned this Jul 3, 2019
@twangboy twangboy requested a review from dwoz Jul 3, 2019
@dwoz
dwoz approved these changes Jul 5, 2019
@twangboy twangboy merged commit 7a5111b into saltstack:2019.2.1 Jul 5, 2019
1 check passed
1 check passed
WIP Ready for review
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.