support extracting SANs from SSL certificates and adding them to nginx config

This commit is contained in:
Michael Hobbs committed 2015-01-15 12:08:27 -08:00
1 parent a0c5c4576e
commit 6cd89fa72a
4 files changed
+44 -4

No files matched your search

+30 -1
View File
@@ -25,10 +25,39 @@ teardown() {
@test "nginx:build-config (with SSL CN mismatch)" {
setup_test_tls
deploy_app
run /bin/bash -c "dokku domains $TEST_APP | grep node-js-app.dokku.me"
run /bin/bash -c "dokku domains $TEST_APP | egrep ^node-js-app\.dokku\.me$"
echo "output: "$output
echo "status: "$status
assert_output "node-js-app.dokku.me"
run bash -c "response=\"$(curl -LkSs node-js-app.dokku.me)\"; echo \$response; test \"\$response\" == \"nodejs/express\""
echo "output: "$output
echo "status: "$status
assert_success
}
@test "nginx:build-config (with SSL and Multiple SANs)" {
setup_test_tls_with_sans
deploy_app
run /bin/bash -c "dokku domains $TEST_APP | egrep ^test\.dokku\.me$"
echo "output: "$output
echo "status: "$status
assert_output "test.dokku.me"
run /bin/bash -c "dokku domains $TEST_APP | grep ^www\.test\.dokku\.me$"
echo "output: "$output
echo "status: "$status
assert_output "www.test.dokku.me"
run bash -c "response=\"$(curl -LkSs test.dokku.me)\"; echo \$response; test \"\$response\" == \"nodejs/express\""
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "response=\"$(curl -LkSs www.test.dokku.me)\"; echo \$response; test \"\$response\" == \"nodejs/express\""
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "response=\"$(curl -LkSs www.test.app.dokku.me)\"; echo \$response; test \"\$response\" == \"nodejs/express\""
echo "output: "$output
echo "status: "$status
assert_success
}
@test "nginx:build-config (no global VHOST and domains:add)" {