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 `unit.modules.test_win_file.WinFileTestCase.test_issue_52002_check_file_remove_symlink` #53157

Merged
merged 2 commits into from May 22, 2019

Conversation

@twangboy
Copy link
Contributor

commented May 21, 2019

What does this PR do?

Attempts to fix the following test on Windows:

unit.modules.test_win_file.WinFileTestCase.test_issue_52002_check_file_remove_symlink

It's failing with the following error:

Traceback (most recent call last):
  File "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\kitchen\\testing\tests\support\helpers.py", line 129, in wrap
    return caller(cls)
  File "c:\users\admini~1\appdata\local\temp\kitchen\testing\tests\unit\modules\test_win_file.py", line 76, in test_issue_52002_check_file_remove_symlink
    self.assertTrue(win_file.symlink(target, symlink))
  File "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\kitchen\\testing\salt\modules\win_file.py", line 1158, in symlink
    exc.strerror
CommandExecutionError: Could not create 'c:\users\admini~1\appdata\local\temp\base-z7v221\child 2\link' - [1314] A required privilege is not held by the client.	

But only when run from kitchen. I believe this has something to do with winrm... it may run as an admin, but without elevating the accounts privileges. This PR attempts to do so before trying to create the symlink.

What issues does this PR fix or reference?

Jenkins failure

Tests written?

Fixes a test... hopefully

Commits signed with GPG?

Yes

@Ch3LL Ch3LL requested a review from dwoz May 22, 2019
@twangboy twangboy added the 2019.2.1 label May 22, 2019
@twangboy twangboy self-assigned this May 22, 2019
@dwoz
dwoz approved these changes May 22, 2019
@twangboy twangboy merged commit 446e70c into saltstack:2019.2.1 May 22, 2019
16 checks passed
16 checks passed
WIP Ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint Python lint test has passed
Details
jenkins/pr/py2-centos-6 The py2-centos-6 job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-debian-8 The py2-debian-8 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py2-ubuntu-1804 The py2-ubuntu-1804 job has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-debian-8 The py3-debian-8 job has passed
Details
jenkins/pr/py3-debian-9 The py3-debian-9 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-ubuntu-1804 The py3-ubuntu-1804 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details
@twangboy twangboy deleted the twangboy:fix_test_win_file_symlink branch May 22, 2019
@twangboy

This comment has been minimized.

Copy link
Contributor Author

commented Jul 9, 2019

Need to bring this into Neon
#53639

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