fix: update test to get the correct label for testing if ssl redirects are working properly

This commit is contained in:
Jose Diaz-Gonzalez
2023-02-11 20:55:20 -05:00
parent 710b1db6be
commit 4ae64b23c6
2 changed files with 6 additions and 4 deletions

View File

@@ -122,6 +122,8 @@ trigger-haproxy-vhosts-docker-args-process-deploy() {
if [[ -n "$haproxy_domains" ]]; then
output="$output --label haproxy.$APP-$PROC_TYPE-https.host=$haproxy_domains"
fi
else
output="$output --label haproxy.$APP-$PROC_TYPE.redirect_ssl=false"
fi
fi

View File

@@ -117,11 +117,11 @@ teardown() {
echo "status: $status"
assert_success
run /bin/bash -c "docker inspect $TEST_APP.web.1 --format '{{ index .Config.Labels \"haproxy\" }}'"
run /bin/bash -c "docker inspect $TEST_APP.web.1 --format '{{ index .Config.Labels \"haproxy.$TEST_APP-web.redirect_ssl\" }}'"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "$TEST_APP.dokku.me:80"
assert_output "false"
run /bin/bash -c "dokku haproxy:set --global letsencrypt-email test@example.com"
echo "output: $output"
@@ -148,11 +148,11 @@ teardown() {
echo "status: $status"
assert_success
run /bin/bash -c "docker inspect $TEST_APP.web.1 --format '{{ index .Config.Labels \"haproxy\" }}'"
run /bin/bash -c "docker inspect $TEST_APP.web.1 --format '{{ index .Config.Labels \"haproxy.$TEST_APP-web.redirect_ssl\" }}'"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "$TEST_APP.dokku.me"
assert_output "true"
run /bin/bash -c "dokku proxy:report $TEST_APP --proxy-port-map"
echo "output: $output"