summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-fsync.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-12-21 14:38:02 -0800
committerRich Trott <rtrott@gmail.com>2017-12-22 10:43:02 -0800
commit92fc14a4595d460394cad8ad5a091dcc450068a5 (patch)
tree86d4485e19a9a513e3399358f83f119d4ecc80da /test/parallel/test-fs-fsync.js
parentab5a2aba38c7de995d7bb56750ab90c0c7849157 (diff)
downloadnode-new-92fc14a4595d460394cad8ad5a091dcc450068a5.tar.gz
test: do not open fixture files for writing
test-fs-fsync makes a copy of a fixture file, but then doesn't do anything with it and instead operates on the original fixture file. This appears to be in error, and this change fixes that. PR-URL: https://github.com/nodejs/node/pull/17808 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-fs-fsync.js')
-rw-r--r--test/parallel/test-fs-fsync.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-fs-fsync.js b/test/parallel/test-fs-fsync.js
index e1ec8ddcc0..80443662c2 100644
--- a/test/parallel/test-fs-fsync.js
+++ b/test/parallel/test-fs-fsync.js
@@ -34,7 +34,7 @@ const fileTemp = path.join(common.tmpDir, 'a.js');
common.refreshTmpDir();
fs.copyFileSync(fileFixture, fileTemp);
-fs.open(fileFixture, 'a', 0o777, common.mustCall(function(err, fd) {
+fs.open(fileTemp, 'a', 0o777, common.mustCall(function(err, fd) {
assert.ifError(err);
fs.fdatasyncSync(fd);