diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-02-02 15:22:02 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-02-02 15:31:36 -0800 |
commit | 87fd86ef22b6b80fa75dd8e50f53a4e62e8339f7 (patch) | |
tree | e9fe3c0192cccba80b65839cd910270089140ed3 /test/unit/test_configurator.rb | |
parent | d140e7b1ff44b06bc54c2b790d06e9c7325503fe (diff) | |
download | unicorn-87fd86ef22b6b80fa75dd8e50f53a4e62e8339f7.tar.gz |
This is much like how nginx does it, except we always require a port when explicitly binding to IPv6 using the "listen" directive. This also adds support to listen with an address-only, which can be useful to Rainbows! users.
Diffstat (limited to 'test/unit/test_configurator.rb')
-rw-r--r-- | test/unit/test_configurator.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/test_configurator.rb b/test/unit/test_configurator.rb index ac1efa8..c19c427 100644 --- a/test/unit/test_configurator.rb +++ b/test/unit/test_configurator.rb @@ -33,6 +33,14 @@ class TestConfigurator < Test::Unit::TestCase assert_equal "0.0.0.0:2007", meth.call('2007') assert_equal "0.0.0.0:2007", meth.call(2007) + %w([::1]:2007 [::]:2007).each do |addr| + assert_equal addr, meth.call(addr.dup) + end + + # for Rainbows! users only + assert_equal "[::]:80", meth.call("[::]") + assert_equal "127.6.6.6:80", meth.call("127.6.6.6") + # the next two aren't portable, consider them unsupported for now # assert_match %r{\A\d+\.\d+\.\d+\.\d+:2007\z}, meth.call('1:2007') # assert_match %r{\A\d+\.\d+\.\d+\.\d+:2007\z}, meth.call('2:2007') |