about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--t/test-lib.sh6
-rw-r--r--test/test_helper.rb3
2 files changed, 9 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 22497f3..314e0c3 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -4,6 +4,12 @@
 . ./my-tap-lib.sh
 
 set +u
+
+# sometimes we rely on http_proxy to avoid wasting bandwidth with Isolate
+# and multiple Ruby versions
+NO_PROXY=${UNICORN_TEST_ADDR-127.0.0.1}
+export NO_PROXY
+
 set -e
 RUBY="${RUBY-ruby}"
 RUBY_VERSION=${RUBY_VERSION-$($RUBY -e 'puts RUBY_VERSION')}
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 5b750ee..f0da9c1 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -8,6 +8,9 @@
 
 STDIN.sync = STDOUT.sync = STDERR.sync = true # buffering makes debugging hard
 
+# FIXME: move curl-dependent tests into t/
+ENV['NO_PROXY'] ||= ENV['UNICORN_TEST_ADDR'] || '127.0.0.1'
+
 # Some tests watch a log file or a pid file to spring up to check state
 # Can't rely on inotify on non-Linux and logging to a pipe makes things
 # more complicated