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

test, win32: fix up symlink tests #10477

Closed

Commits on Dec 30, 2016

  1. test, win: fix up symlink tests

    On Windows, creating a symlink requires admin privileges.
    There were two tests which created symlinks which were failing when run
    as non-admin.
    
    test-fs-symlink.js already had a check for privileges on Windows
    but it had a couple issues:
    1. It assumed that whoami was the one that came with windows.
       However, whoami also ships with Win32 Unix utility ports
       like the distribution with git, which can cause this to get check
       tripped up.
    2. On failure, the check would just return from the callback instead of
       exiting
    3. whoami was executed asynchronously so the test would run regardless
       of privilege state.
    
    test-fs-options-immutable had no check.
    
    As part of this change, I refactored the privilege checking to
    a function in common, and changed both above tests to use the
    refactored function.
    
    Also documented this function in test\README.md
    
    PR-URL: nodejs#10477
    digitalinfinity committed Dec 30, 2016
    Configuration menu
    Copy the full SHA
    7921443 View commit details
    Browse the repository at this point in the history