add ipv6 detection for external port binding

This commit is contained in:
Michael Hobbs
2015-01-05 10:47:20 -08:00
parent 948d7902f2
commit 441d212ef2
3 changed files with 46 additions and 5 deletions

View File

@@ -45,7 +45,7 @@ teardown() {
assert_success
}
@test "port exposure (without global VHOST and ip as HOSTNAME)" {
@test "port exposure (without global VHOST and IPv4 address as HOSTNAME)" {
rm "$DOKKU_ROOT/VHOST"
echo "127.0.0.1" > "$DOKKU_ROOT/HOSTNAME"
deploy_app
@@ -55,3 +55,14 @@ teardown() {
echo "status: "$status
assert_success
}
@test "port exposure (without global VHOST and IPv6 address as HOSTNAME)" {
rm "$DOKKU_ROOT/VHOST"
echo "fda5:c7db:a520:bb6d::aabb:ccdd:eeff" > "$DOKKU_ROOT/HOSTNAME"
deploy_app
CONTAINER_ID=$(docker ps --no-trunc| grep dokku/$TEST_APP | grep "start web" | awk '{ print $1 }')
run bash -c "docker port $CONTAINER_ID | sed 's/[0-9.]*://' | egrep '[0-9]*'"
echo "output: "$output
echo "status: "$status
assert_success
}