tests: add a test for the error message
This commit is contained in:
1 parent
f3b04032a8
commit
47f5af44c5
2 files changed
+19
-1
No files matched your search
@@ -25,7 +25,7 @@ trigger-domains-core-post-deploy() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$domain" =~ $RE_IPV6 ]]; then
|
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."
|
dokku_log_warn "Ensure the default nginx site is removed before continuing."
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -355,3 +355,21 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
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