-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add test-npm-install to parallel tests suite #5166
Conversation
CI: https://ci.nodejs.org/job/node-test-pull-request/1613/ |
proc.on('exit', function(code) { | ||
// npm install in tmpDir should be essentially a no-op | ||
// if npm is not broken the process should always exit 0 | ||
// assert that there are no obvious failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: capitalization and (more importantly) punctuation in comments. I tried reading the first two lines four or five times before I figured out that each line is its own sentence.
It seems like whatever I had working locally is not working atm... digging in |
proc.stderr.setEncoding('utf8'); | ||
|
||
proc.stdout.on('data', (data) => stdout += data); | ||
proc.stdout.on('err', (data) => stderr += data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably no need to capture stdout
and stderr
if nothing will be done with them.
If it passes again when npm is fixed on master, LGTM with comments. |
@Trott updated which fixes all your nits |
'npm', | ||
'bin', | ||
'npm-cli.js' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mebbe this would be more stable https://github.com/nodejs/node/blob/master/deps/npm/package.json#L31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxogden can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
less likely to break if npm changes their entry point. prob doesnt matter though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what you mean.
I'd prefer to not start grabbing package.json and resolving the path from there... lots of extra logic.
If npm changes their entry point this test will break when they send in a PR... it will be a pretty easy fix
closing in favor of #5163 will reopen if that does not land |
91b4f79
to
f0fbc73
Compare
This test doesn't strike me as a very good idea for two reasons:
|
Marking as don't land in v4 until we're certain this is going to work out. |
LGTM if CI is happy. The last CI run failed because a slave went offline. New run here: https://ci.nodejs.org/job/node-test-pull-request/1817/ |
Currently we are not testing that `npm install` works. This is a very naive / basic test that shells out to `npm install` in an empty `tempDir`. While this test will not be able to check that `npm install` is 100% working, it should catch certain edge cases that break it.
npm definitely doesn't do anything on the network with an empty package.json. Even with dependencies, it'll only touch the network if your deps require it (eg, registry, remote tarball, remote git repo). |
I'm not seeing any -1's and I'm seeing 3 LGTM's I'll land this at some point on Monday if no one else has objections |
Following @iarna comment, would it be a good idea to add a local path as a dependency? Something like this:
If I understand it correctly, it would not trigger any network operation. |
@santigimeno you'd probably want a relative path, but yeah, that'd exercise a bit more. But I'd be -1 on holding back this PR any further. Seems like that'd make a fine new PR though. (And for the record, I'm LGTM on this as is.) |
Ok, I can to that when this PR is merged. Thanks |
Currently we are not testing that `npm install` works. This is a very naive / basic test that shells out to `npm install` in an empty `tempDir`. While this test will not be able to check that `npm install` is 100% working, it should catch certain edge cases that break it. PR-URL: nodejs#5166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
landed in 061ebb3 |
Currently we are not testing that `npm install` works. This is a very naive / basic test that shells out to `npm install` in an empty `tempDir`. While this test will not be able to check that `npm install` is 100% working, it should catch certain edge cases that break it. PR-URL: #5166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Currently we are not testing that `npm install` works. This is a very naive / basic test that shells out to `npm install` in an empty `tempDir`. While this test will not be able to check that `npm install` is 100% working, it should catch certain edge cases that break it. PR-URL: #5166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
@jasnell are you open to moving to lts watch? |
I haven't been following how well this has been working since it landed. I assume no issues? |
moving to lts-watch as there have been no issues |
Currently we are not testing that `npm install` works. This is a very naive / basic test that shells out to `npm install` in an empty `tempDir`. While this test will not be able to check that `npm install` is 100% working, it should catch certain edge cases that break it. PR-URL: #5166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Currently we are not testing that `npm install` works. This is a very naive / basic test that shells out to `npm install` in an empty `tempDir`. While this test will not be able to check that `npm install` is 100% working, it should catch certain edge cases that break it. PR-URL: #5166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Currently we are not testing that
npm install
works.This is a very naive / basic test that shells out to
npm install
in an empty
tempDir
. While this test will not be able to checkthat
npm install
is 100% working, it should catch certain edgecases that break it.
This is currently blocked from being tested until #4525 lands
/cc @nodejs/npm @nodejs/testing