From 23525b05473651c6d317117071bcab0c34576a22 Mon Sep 17 00:00:00 2001 From: Denys Otrishko Date: Wed, 26 Sep 2018 14:00:08 +0300 Subject: [PATCH] test: replace localhost with os.hostname in fs-readfilesync PR-URL: https://github.com/nodejs/node/pull/23101 Fixes: https://github.com/nodejs/node/issues/21501 Reviewed-By: Anna Henningsen Reviewed-By: John-David Dalton --- test/parallel/test-fs-readfilesync-enoent.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-fs-readfilesync-enoent.js b/test/parallel/test-fs-readfilesync-enoent.js index 3d421e52b120af..0369f358770383 100644 --- a/test/parallel/test-fs-readfilesync-enoent.js +++ b/test/parallel/test-fs-readfilesync-enoent.js @@ -11,6 +11,7 @@ if (!common.isWindows) const assert = require('assert'); const fs = require('fs'); +const os = require('os'); const path = require('path'); function test(p) { @@ -23,10 +24,10 @@ function test(p) { })); } -test('//localhost/c$/Windows/System32'); -test('//localhost/c$/Windows'); -test('//localhost/c$/'); -test('\\\\localhost\\c$\\'); +test(`//${os.hostname()}/c$/Windows/System32`); +test(`//${os.hostname()}/c$/Windows`); +test(`//${os.hostname()}/c$/`); +test(`\\\\${os.hostname()}\\c$\\`); test('C:\\'); test('C:'); test(process.env.windir);