Skip to content
Browse files

Add a test for custom .npmrc support

  • Loading branch information...
1 parent f6d0b9c commit 991ceb99492574cc2b2840754783fb4654a59bd9 @rykov rykov committed Dec 7, 2013
Showing with 31 additions and 1 deletion.
  1. +8 −1 bin/test
  2. +7 −0 test/userconfig/.npmrc
  3. +1 −0 test/userconfig/README.md
  4. +15 −0 test/userconfig/package.json
View
9 bin/test
@@ -84,6 +84,13 @@ testModulesCheckedIn() {
assertCapturedSuccess
}
+testUserConfig() {
+ compile "userconfig"
+ assertCaptured "https://www.google.com/"
+ assertCaptured "registry error"
+ assertCapturedError 1 ""
+}
+
# Pending Tests
# testNodeBinariesAddedToPath() {
@@ -135,7 +142,7 @@ compile_dir=""
compile() {
compile_dir=$(mktmpdir)
- cp -r ${bp_dir}/test/$1/* ${compile_dir}/
+ cp -r ${bp_dir}/test/$1/. ${compile_dir}
capture ${bp_dir}/bin/compile ${compile_dir} ${2:-$(mktmpdir)}
}
View
7 test/userconfig/.npmrc
@@ -0,0 +1,7 @@
+; Any URL that throws 404s
+registry = "https://www.google.com/"
+strict-ssl = false
+; Ensure fast failure
+fetch-retries = 0
+fetch-retry-factor = 0
+fetch-retry-mintimeout = 0
View
1 test/userconfig/README.md
@@ -0,0 +1 @@
+A fake README, to keep npm from polluting stderr.
View
15 test/userconfig/package.json
@@ -0,0 +1,15 @@
+{
+ "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": {
+ "something-not-in-cache": "*"
+ },
+ "engines": {
+ "node": "~0.10.0"
+ }
+}

0 comments on commit 991ceb9

Please sign in to comment.
Something went wrong with that request. Please try again.