Skip to content

Commit cf84f20

Browse files
danbevtargos
authored andcommitted
test: skip fs-copyfile-respect-permission if root
Currently, if this test is run as the root user the following failure will occur: === release test-fs-copyfile-respect-permissions === Path: parallel/test-fs-copyfile-respect-permissions assert.js:89 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Missing expected exception (check). at Object.<anonymous> (/node/test/parallel/test-fs-copyfile-respect-permissions.js:38:10) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Function.Module.runMain (internal/modules/cjs/loader.js:826:10) at internal/main/run_main_module.js:17:11 Command: out/Release/node test/parallel/test-fs-copyfile-respect-permissions.js [05:41|% 100|+ 2620|- 1]: Done This commit adds a root user check and skips this test if running as the user root. PR-URL: #27378 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
1 parent 149412c commit cf84f20

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/parallel/test-fs-copyfile-respect-permissions.js

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
const common = require('../common');
77

8+
if (!common.isWindows && process.getuid() === 0)
9+
common.skip('as this test should not be run as `root`');
10+
811
const tmpdir = require('../common/tmpdir');
912
tmpdir.refresh();
1013

0 commit comments

Comments
 (0)