Uh oh!
There was an error while loading. Please reload this page.
test: add tests for fsPromises.chown to increase coverage - #20574
test: add tests for fsPromises.chown to increase coverage#20574shisama wants to merge 4 commits into
Conversation
BridgeAR
commented
May 18, 2018
There was a problem hiding this comment.
process.getuid() and process.getgid() are not defined on Windows.
There was a problem hiding this comment.
@cjihrig
Thank you for your review.
Fixed not to call the process.getuid() and process.getgid() on Windows.
Trott
left a comment
There was a problem hiding this comment.
These tests seem to fail just about everywhere in CI...
e7b2fdf to
b4fd185CompareTrott
commented
May 22, 2018
Rather than skipping on Windows, should we check that we get the right expected error when on Windows? |
There was a problem hiding this comment.
Tests still failing on most platforms:
15:19:05 not ok 584 parallel/test-fs-promises15:19:05 ---15:19:05 duration_ms: 0.17115:19:05 severity: fail15:19:05 exitcode: 115:19:05 stack: |-15:19:05 (node:4855) ExperimentalWarning: The fs.promises API is experimental15:19:05 /home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1804-docker/test/common/index.js:79815:19:05 (err) => process.nextTick(() => { throw err; }));15:19:05 ^15:19:05 15:19:05 AssertionError [ERR_ASSERTION]: Code: ERR_METHOD_NOT_IMPLEMENTED; The provided arguments length (0) does not match the required ones (1).15:19:05 at getMessage (internal/errors.js:223:3)15:19:05 at new NodeError (internal/errors.js:156:13)15:19:05 at lchown (internal/fs/promises.js:383:11)15:19:05 at doTest (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1804-docker/test/parallel/test-fs-promises.js:140:15)15:19:05 ...shisama
commented
May 23, 2018
@Trott I missed the doc indicates that the fsPromises.lchown is only implemented on macOS. I fixed the method is only called on macOS. |
jasnell
commented
May 23, 2018
Lots of red in the new CI run. Some are flaky failures, some are build bot failures, some are potentially related.... CI seems rather iffy these days... running again: https://ci.nodejs.org/job/node-test-pull-request/15056/ |
shisama
commented
May 24, 2018
jasnell
commented
May 24, 2018
yeah, CI in general is in rough shape right now. Let's give it another day or so to see if we can get those issues figured out then give this another run. |
BridgeAR
commented
May 29, 2018
@Trott PTAL. I just checked the CI and added a green check mark next to the CI that you started. |
Trott
commented
May 31, 2018
CI: https://ci.nodejs.org/job/node-test-pull-request/15174/ If CI is green or yellow, feel free to clear my objection (although it looks like this needs a rebase and that will probably mean another CI after the rebase). |
Trott
commented
May 31, 2018
(And again, I'd prefer that we don't skip the test on unsupported platforms but instead check that we get the expected error. This will help prevent us from making changes that introduce cryptic unhelpful errors by accident. But this is a suggestion and I'm certainly not going to block this on it. It's also something that can be added in a subsequent PR.) |
511e744 to
0e3a4caComparea41e746 to
8041fa3Compare8041fa3 to
012b2ccCompareshisama
commented
Jun 22, 2018
Trott
commented
Jun 22, 2018
apapirovski
commented
Jun 25, 2018
There was a problem hiding this comment.
If #21498 lands, this could become !common.isWindows.
f2d508b to
345ddc5CompareTo increase test coverage for fs/promises, add tests for methods chown(), filehandle.chown() and lchown().
Fix not to call `process.getuid()` and `process.getgid()` on Windows.
Add error tests for fsPromises.chown and FileHandle.chown on all platforms.
345ddc5 to
b1183acCompareTimothyGu
commented
Jul 30, 2018
TimothyGu
commented
Jul 30, 2018
TimothyGu
commented
Jul 30, 2018
Landed in a4ce449. |
To increase test coverage for fs/promises, add tests for methods chown(), filehandle.chown() and lchown(). PR-URL: #20574 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
To increase test coverage for fs/promises, add tests for methods chown(), filehandle.chown() and lchown(). PR-URL: #20574 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
To increase test coverage for fs/promises, add tests for
methods chown(), filehandle.chown() and lchown().
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes