summaryrefslogtreecommitdiff
path: root/test/README.md
diff options
context:
space:
mode:
authorHitesh Kanwathirtha <hiteshk@microsoft.com>2016-12-27 15:18:41 -0800
committerGibson Fahnestock <gib@uk.ibm.com>2016-12-31 22:45:23 +0200
commitee9df357ffa9a9c5233f77b7177d8b5e7efe7997 (patch)
treebbef34979f656b87429fd75b4af39665e9d5f793 /test/README.md
parenta6ca94a5f5bc29e70a9ad34cc41eacfded499a4a (diff)
downloadandroid-node-v8-ee9df357ffa9a9c5233f77b7177d8b5e7efe7997.tar.gz
android-node-v8-ee9df357ffa9a9c5233f77b7177d8b5e7efe7997.tar.bz2
android-node-v8-ee9df357ffa9a9c5233f77b7177d8b5e7efe7997.zip
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: https://github.com/nodejs/node/pull/10477 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test/README.md')
-rw-r--r--test/README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/README.md b/test/README.md
index 8d8cec4491..4312e6fcf3 100644
--- a/test/README.md
+++ b/test/README.md
@@ -163,6 +163,13 @@ A stream to push an array into a REPL
Blocks for `time` amount of time.
+### canCreateSymLink
+API to indicate whether the current running process can create
+symlinks. On Windows, this returns false if the process running
+doesn't have privileges to create symlinks (specifically
+[SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)).
+On non-Windows platforms, this currently returns true.
+
### ddCommand(filename, kilobytes)
* return [&lt;Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)