aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-access.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2015-06-09 11:40:55 -0700
committerRich Trott <rtrott@gmail.com>2015-06-13 22:27:17 -0700
commit7c79490bfbfee3868c1524207fcd11e0149b9c73 (patch)
tree2b93b80b6921c0f81d36efcd51c2524d875c6669 /test/parallel/test-fs-access.js
parent88d7904c0ba66bd2ced87f674d3f6ee098db970c (diff)
downloadandroid-node-v8-7c79490bfbfee3868c1524207fcd11e0149b9c73.tar.gz
android-node-v8-7c79490bfbfee3868c1524207fcd11e0149b9c73.tar.bz2
android-node-v8-7c79490bfbfee3868c1524207fcd11e0149b9c73.zip
test: only refresh tmpDir for tests that need it
Expose `common.refreshTmpDir()` and only call it for tests that use common.tmpDir or common.PIPE. A positive side effect is the removal of a code smell where child processes were detected by the presence of `.send()`. Now each process can decide for itself if it needs to refresh tmpDir. PR-URL: https://github.com/nodejs/io.js/pull/1954 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'test/parallel/test-fs-access.js')
-rw-r--r--test/parallel/test-fs-access.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/parallel/test-fs-access.js b/test/parallel/test-fs-access.js
index 6ad28612e9..9c586692b8 100644
--- a/test/parallel/test-fs-access.js
+++ b/test/parallel/test-fs-access.js
@@ -21,6 +21,7 @@ var createFileWithPerms = function(file, mode) {
fs.chmodSync(file, mode);
};
+common.refreshTmpDir();
createFileWithPerms(readOnlyFile, 0o444);
createFileWithPerms(readWriteFile, 0o666);