support domains that start with digits per RFC1123. closes #2257
This commit is contained in:
@@ -1057,7 +1057,7 @@ strip_inline_comments() {
|
|||||||
|
|
||||||
is_valid_hostname() {
|
is_valid_hostname() {
|
||||||
declare desc="return 0 if argument is a valid hostname; else return 1"
|
declare desc="return 0 if argument is a valid hostname; else return 1"
|
||||||
local hostname_string="$1"; local hostname_regex='^(([a-zA-Z\*](-?[a-zA-Z0-9])*)\.)*[a-zA-Z\*](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}$'
|
local hostname_string="$1"; local hostname_regex='^(([a-zA-Z0-9\*](-?[a-zA-Z0-9])*)\.)*[a-zA-Z\*](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}$'
|
||||||
if [[ $hostname_string =~ $hostname_regex ]]; then
|
if [[ $hostname_string =~ $hostname_regex ]]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -31,10 +31,14 @@ teardown() {
|
|||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
|
run dokku domains:add $TEST_APP 2.app.dokku.me
|
||||||
|
echo "output: "$output
|
||||||
|
echo "status: "$status
|
||||||
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(domains) domains:add (multiple)" {
|
@test "(domains) domains:add (multiple)" {
|
||||||
run dokku domains:add $TEST_APP www.test.app.dokku.me test.app.dokku.me
|
run dokku domains:add $TEST_APP 2.app.dokku.me www.test.app.dokku.me test.app.dokku.me
|
||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
|
|||||||
Reference in New Issue
Block a user