filter out literal wildcard when deploying an unrelated domain. closes #1185
This commit is contained in:
@@ -9,7 +9,7 @@ setup() {
|
||||
}
|
||||
|
||||
teardown() {
|
||||
destroy_app
|
||||
destroy_app 0 $TEST_APP
|
||||
[[ -f "$DOKKU_ROOT/VHOST.bak" ]] && mv "$DOKKU_ROOT/VHOST.bak" "$DOKKU_ROOT/VHOST"
|
||||
[[ -f "$DOKKU_ROOT/HOSTNAME.bak" ]] && mv "$DOKKU_ROOT/HOSTNAME.bak" "$DOKKU_ROOT/HOSTNAME"
|
||||
disable_tls_wildcard
|
||||
@@ -82,6 +82,15 @@ assert_http_success() {
|
||||
assert_ssl_domain "wildcard2.dokku.me"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (wildcard SSL & unrelated domain)" {
|
||||
destroy_app
|
||||
TEST_APP="${TEST_APP}.example.com"
|
||||
setup_test_tls_wildcard
|
||||
deploy_app nodejs-express dokku@dokku.me:$TEST_APP
|
||||
run /bin/bash -c "egrep '*.dokku.me' $DOKKU_ROOT/${TEST_APP}/nginx.conf | wc -l"
|
||||
assert_output "0"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (with SSL CN mismatch)" {
|
||||
setup_test_tls
|
||||
deploy_app
|
||||
|
||||
@@ -89,7 +89,8 @@ create_app() {
|
||||
}
|
||||
|
||||
destroy_app() {
|
||||
RC="$1"; RC=${RC:=0}
|
||||
local RC="$1"; local RC=${RC:=0}
|
||||
local TEST_APP="$2"; local TEST_APP=${TEST_APP:=my-cool-guy-test-app}
|
||||
echo $TEST_APP | dokku apps:destroy $TEST_APP
|
||||
return $RC
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user