Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Check valid username first (fixes failing symlink test) #53467
What does this PR do?
The failing symlink test had to do with two tests in
What issues does this PR fix or reference?
This is the rest of #53437
Commits signed with GPG?
modules/file.py: Pass the right parameters to `check_perms` on Windows platform/win.py: Return actual error on runas failure platform/win.py: Setup environment for CreateProcessWithLogonW states/file.py: Pass the right parameters to `file.check_perms` on Windows states/zfs.py: Fix __virtual__ so it doesn't stacktrace in Windows logs states/zpool.py: Fix __virtual__ so it doesn't stacktrace in Windows logs utils/win_runas.py: Cleanup the handles a little better by using some try/finally blocks. states/test_file.py: Just use os.mkdir on Windows as the mode is ignored
I wasn't running sudo, but now it tells you that And verifies that the user is added and the state is run successfully before continuing with the test
Many of the functions from the `filemod` module are "namespaced" into the `win_file` module. That's the file module that gets used on Windows, so we need to make sure the `check_perms` function from the `win_file` module is used on Windows.
@@ Coverage Diff @@ ## 2019.2.1 #53467 +/- ## ============================================= + Coverage 11.45% 37.1% +25.64% ============================================= Files 1520 1577 +57 Lines 252467 269609 +17142 Branches 53835 57450 +3615 ============================================= + Hits 28922 100028 +71106 + Misses 221580 158352 -63228 - Partials 1965 11229 +9264