tests: add a test for the error message
This commit is contained in:
@@ -25,7 +25,7 @@ trigger-domains-core-post-deploy() {
|
||||
fi
|
||||
|
||||
if [[ "$domain" =~ $RE_IPV6 ]]; then
|
||||
dokku_log_warn "Detected IPv4 domain name with nginx proxy enabled."
|
||||
dokku_log_warn "Detected IPv6 domain name with nginx proxy enabled."
|
||||
dokku_log_warn "Ensure the default nginx site is removed before continuing."
|
||||
break
|
||||
fi
|
||||
|
||||
@@ -355,3 +355,21 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(domains) verify warning on ipv4/ipv6 domain name" {
|
||||
touch /etc/nginx/sites-enabled/default
|
||||
rm "$DOKKU_ROOT/VHOST"
|
||||
echo "127.0.0.1" >"$DOKKU_ROOT/VHOST"
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "Detected IPv4 domain name with nginx proxy enabled."
|
||||
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
run /bin/bash -c "dokku ps:rebuild $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "Detected IPv4 domain name with nginx proxy enabled." 0
|
||||
}
|
||||
Reference in New Issue
Block a user