add certificate CN to app VHOST if it's not already
This commit is contained in:
20
tests/unit/nginx-vhosts.bats
Normal file
20
tests/unit/nginx-vhosts.bats
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
create_app
|
||||
setup_test_tls
|
||||
deploy_app
|
||||
}
|
||||
|
||||
teardown() {
|
||||
destroy_app
|
||||
}
|
||||
|
||||
@test "nginx:build-config (with SSL CN mismatch)" {
|
||||
run /bin/bash -c "dokku domains $TEST_APP | grep node-js-app.dokku.me"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output "node-js-app.dokku.me"
|
||||
}
|
||||
BIN
tests/unit/server_ssl.tar
Normal file
BIN
tests/unit/server_ssl.tar
Normal file
Binary file not shown.
@@ -101,3 +101,10 @@ deploy_app() {
|
||||
git commit -m 'initial commit'
|
||||
git push target master || destroy_app
|
||||
}
|
||||
|
||||
setup_test_tls() {
|
||||
TLS="/home/dokku/$TEST_APP/tls"
|
||||
mkdir -p $TLS
|
||||
tar xf $BATS_TEST_DIRNAME/server_ssl.tar -C $TLS
|
||||
sudo chown -R dokku:dokku $TLS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user