Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
3c6fd89f
Commit
3c6fd89f
authored
Jun 30, 2016
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test and implementation for econnreset warnings
parent
db801a04
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
1 deletion
+30
-1
compile
bin/compile
+1
-1
failure.sh
lib/failure.sh
+7
-0
package.json
test/fixtures/econnreset-mock/package.json
+13
-0
run
test/run
+9
-0
No files found.
bin/compile
View file @
3c6fd89f
...
...
@@ -43,7 +43,7 @@ handle_failure() {
warn_untracked_dependencies
"
$LOG_FILE
"
warn_angular_resolution
"
$LOG_FILE
"
warn_missing_devdeps
"
$LOG_FILE
"
warn_
no_star
t
"
$LOG_FILE
"
warn_
econnrese
t
"
$LOG_FILE
"
failure_message | output
"
$LOG_FILE
"
}
trap
'handle_failure'
ERR
...
...
lib/failure.sh
View file @
3c6fd89f
...
...
@@ -121,3 +121,10 @@ warn_no_start() {
fi
fi
}
warn_econnreset
()
{
local
log_file
=
"
$1
"
if
grep
-qi
'econnreset'
"
$log_file
"
;
then
warning
"ECONNRESET issues may be related to npm versions"
"https://github.com/npm/registry/issues/10#issuecomment-217141066"
fi
}
test/fixtures/econnreset-mock/package.json
0 → 100644
View file @
3c6fd89f
{
"name"
:
"econnreset-mock"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
"start"
:
"node server.js"
,
"postinstall"
:
"echo 'npm ERR! network read ECONNRESET' && exit 1"
},
"keywords"
:
[],
"author"
:
""
,
"license"
:
"ISC"
}
test/run
View file @
3c6fd89f
#!/usr/bin/env bash
# See README.md for info on running these tests.
testWarnEconnreset
()
{
compile
"econnreset-mock"
assertCaptured
"may be related to npm versions"
assertCapturedError
compile
"no-version"
assertNotCaptured
"may be related to npm versions"
assertCapturedSuccess
}
testWarnNoStart
()
{
compile
"no-start"
assertCaptured
"may not specify any way to start"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment