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
aa8f09e0
Commit
aa8f09e0
authored
Jul 22, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test and implementation to detect un-downloadable binaries
parent
bc0bcf73
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
3 deletions
+37
-3
CHANGELOG.md
CHANGELOG.md
+1
-0
binaries.sh
lib/binaries.sh
+4
-2
README.md
test/fixtures/invalid-io/README.md
+0
-0
package.json
test/fixtures/invalid-io/package.json
+3
-1
README.md
test/fixtures/invalid-node/README.md
+1
-0
package.json
test/fixtures/invalid-node/package.json
+14
-0
run
test/run
+14
-0
No files found.
CHANGELOG.md
View file @
aa8f09e0
## Upcoming
-
Fix runtime signature cache invalidation
-
Provide error messaging for un-downloadable binaries
## v77
...
...
lib/binaries.sh
View file @
aa8f09e0
...
...
@@ -18,7 +18,8 @@ install_nodejs() {
echo
"Downloading and installing node
$version
..."
local
download_url
=
"http://s3pository.heroku.com/node/v
$version
/node-v
$version
-
$os
-
$cpu
.tar.gz"
curl
"
$download_url
"
-s
-o
- |
tar
xzf -
-C
/tmp
curl
"
$download_url
"
--silent
--fail
-o
/tmp/node.tar.gz
||
(
echo
"Unable to download node
$version
; does it exist?"
&&
false
)
tar
xzf /tmp/node.tar.gz
-C
/tmp
mv
/tmp/node-v
$version
-
$os
-
$cpu
/
*
$dir
chmod
+x
$dir
/bin/
*
}
...
...
@@ -34,7 +35,8 @@ install_iojs() {
echo
"Downloading and installing iojs
$version
..."
local
download_url
=
"https://iojs.org/dist/v
$version
/iojs-v
$version
-
$os
-
$cpu
.tar.gz"
curl
$download_url
-s
-o
- |
tar
xzf -
-C
/tmp
curl
"
$download_url
"
--silent
--fail
-o
/tmp/node.tar.gz
||
(
echo
"Unable to download iojs
$version
; does it exist?"
&&
false
)
tar
xzf /tmp/node.tar.gz
-C
/tmp
mv
/tmp/iojs-v
$version
-
$os
-
$cpu
/
*
$dir
chmod
+x
$dir
/bin/
*
}
...
...
test/fixtures/invalid-
node-version
/README.md
→
test/fixtures/invalid-
io
/README.md
View file @
aa8f09e0
File moved
test/fixtures/invalid-
node-version
/package.json
→
test/fixtures/invalid-
io
/package.json
View file @
aa8f09e0
...
...
@@ -6,7 +6,9 @@
"type"
:
"git"
,
"url"
:
"http://github.com/example/example.git"
},
"dependencies"
:
{
},
"engines"
:
{
"
node"
:
">2.0
"
"
iojs"
:
"2.0.99
"
}
}
test/fixtures/invalid-node/README.md
0 → 100644
View file @
aa8f09e0
A fake README, to keep npm from polluting stderr.
\ No newline at end of file
test/fixtures/invalid-node/package.json
0 → 100644
View file @
aa8f09e0
{
"name"
:
"node-buildpack-test-app"
,
"version"
:
"0.0.1"
,
"description"
:
"node buildpack integration test app"
,
"repository"
:
{
"type"
:
"git"
,
"url"
:
"http://github.com/example/example.git"
},
"dependencies"
:
{
},
"engines"
:
{
"node"
:
"0.11.33"
}
}
test/run
View file @
aa8f09e0
#!/usr/bin/env bash
# See README.md for info on running these tests.
testInvalidNode
()
{
compile
"invalid-node"
assertCaptured
"Downloading and installing node 0.11.33"
assertCaptured
"Unable to download node 0.11.33"
assertCapturedError
}
testInvalidIo
()
{
compile
"invalid-io"
assertCaptured
"Downloading and installing iojs 2.0.99"
assertCaptured
"Unable to download iojs 2.0.99"
assertCapturedError
}
testBuildWithCache
()
{
cache
=
$(
mktmpdir
)
...
...
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