feat: do not append the global domain for matching subdomains
If the subdomain is url-like, assume it is a valid url and use it for the default domain name. This allows users to specify the default domain for an app even if that is a subdomain of a global vhost. Closes #3529
This commit is contained in:
@@ -284,3 +284,22 @@ teardown() {
|
||||
assert_line ${TEST_APP}.global3.dokku.me
|
||||
assert_line ${TEST_APP}.global4.dokku.me
|
||||
}
|
||||
|
||||
@test "(domains) app name overlaps with global domain.tld" {
|
||||
run /bin/bash -c "dokku domains:set-global dokku.test"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
# run domains:clear in order to invoke default vhost creation
|
||||
dokku --quiet apps:create test.dokku.test
|
||||
dokku --quiet domains:clear test.dokku.test
|
||||
|
||||
run /bin/bash -c "dokku domains:report test.dokku.test --domains-app-vhosts"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "test.dokku.test"
|
||||
|
||||
dokku --force apps:destroy test.dokku.test
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user