FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: add test-npm-install to parallel tests suite by MylesBorins · Pull Request #5166 · nodejs/node · GitHub

/ node Public

test: add test-npm-install to parallel tests suite - #5166

Closed
MylesBorins wants to merge 1 commit into
nodejs:masterfrom
MylesBorins:test-npm
Closed

test: add test-npm-install to parallel tests suite#5166
MylesBorins wants to merge 1 commit into
nodejs:masterfrom
MylesBorins:test-npm

Conversation

Copy link
Copy Markdown
Contributor

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.

This is currently blocked from being tested until #4525 lands

/cc @nodejs/npm @nodejs/testing

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/1613/
Expected to be all red as npm is broken on master

Comment thread test/parallel/test-npm-install.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

MylesBorins changed the title test: add test-npm-install to parallel tests suite WIP test: add test-npm-install to parallel tests suite Feb 9, 2016

Copy link
Copy Markdown
Contributor Author

It seems like whatever I had working locally is not working atm... digging in

Comment thread test/parallel/test-npm-install.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Probably no need to capture stdout and stderr if nothing will be done with them.

Trott commented Feb 9, 2016

Copy link
Copy Markdown
Member

If it passes again when npm is fixed on master, LGTM with comments.

MylesBorins changed the title WIP test: add test-npm-install to parallel tests suite test: add test-npm-install to parallel tests suite Feb 9, 2016

Copy link
Copy Markdown
Contributor Author

@Trott updated which fixes all your nits

mscdex added test Issues and PRs related to the tests. npm Issues and PRs related to the npm client dependency or the npm registry. labels Feb 9, 2016
Comment thread test/parallel/test-npm-install.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@maxogden can you elaborate?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

less likely to break if npm changes their entry point. prob doesnt matter though :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Contributor Author

closing in favor of #5163

will reopen if that does not land

MylesBorins closed this Feb 9, 2016
MylesBorins deleted the test-npm branch February 10, 2016 01:14
MylesBorins restored the test-npm branch February 11, 2016 19:03
MylesBorins reopened this Feb 11, 2016
MylesBorins deleted the test-npm branch February 12, 2016 00:40
MylesBorins restored the test-npm branch February 13, 2016 10:03
MylesBorins reopened this Feb 13, 2016

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Member

This test doesn't strike me as a very good idea for two reasons:

  1. It seems to require internet access, which makes it unsuitable for test/parallel. test/internet is a better place but it's not run on the CI.
  2. Correct me if I'm wrong, but a plain npm install will walk up the directory tree until it finds a node_modules directory, right? That means you could get some pretty arbitrary behavior based on what people have installed outside their node source tree.

jasnell commented Mar 2, 2016

Copy link
Copy Markdown
Member

Marking as don't land in v4 until we're certain this is going to work out.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

CI is all green. I attempted to look for network traffic but with wireshark, but I'm not familiar enough with it to really get a clear reading, too much noise.

I was talking to @zkat last night who implied there should be no network traffic. Maybe @iarna or @othiym23 can chime in

iarna commented Mar 4, 2016

Copy link
Copy Markdown
Member

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).

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Member

Following @iarna comment, would it be a good idea to add a local path as a dependency? Something like this:

"test-module": "file:///path/to/test-module"

If I understand it correctly, it would not trigger any network operation.

iarna commented Mar 5, 2016

Copy link
Copy Markdown
Member

@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.)

Copy link
Copy Markdown
Member

Ok, I can to that when this PR is merged. Thanks

MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Mar 7, 2016
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>

Copy link
Copy Markdown
Contributor Author

landed in 061ebb3

MylesBorins closed this Mar 7, 2016
Fishrock123 mentioned this pull request Mar 7, 2016
Fishrock123 pushed a commit that referenced this pull request Mar 8, 2016
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>
Fishrock123 pushed a commit that referenced this pull request Mar 8, 2016
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>
santigimeno mentioned this pull request Mar 9, 2016
4 tasks

Copy link
Copy Markdown
Contributor Author

@jasnell are you open to moving to lts watch?

jasnell commented Mar 11, 2016

Copy link
Copy Markdown
Member

I haven't been following how well this has been working since it landed. I assume no issues?

Copy link
Copy Markdown
Contributor Author

moving to lts-watch as there have been no issues

MylesBorins pushed a commit that referenced this pull request Mar 30, 2016
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>
MylesBorins pushed a commit that referenced this pull request Mar 30, 2016
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>
MylesBorins deleted the test-npm branch April 16, 2016 18:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

npm Issues and PRs related to the npm client dependency or the npm registry. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.


Back | FazBrowse Home | New Git URL