fix: correct tests for new domain initialization method

This commit is contained in:
Jose Diaz-Gonzalez
2022-12-01 21:51:47 -05:00
parent 9eab17af11
commit d18cb3766c
2 changed files with 4 additions and 14 deletions

View File

@@ -38,17 +38,15 @@ teardown() {
}
@test "(core) urls (non-ssl)" {
assert_urls "http://dokku.me"
build_nginx_config
assert_urls "http://${TEST_APP}.dokku.me"
add_domain "test.dokku.me"
assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me"
}
@test "(core) urls (app ssl)" {
assert_urls "http://${TEST_APP}.dokku.me"
setup_test_tls
assert_urls "https://dokku.me"
build_nginx_config
dokku proxy:build-config "$TEST_APP"
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me"
add_domain "test.dokku.me"
assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me" "https://${TEST_APP}.dokku.me" "https://test.dokku.me"
@@ -56,15 +54,13 @@ teardown() {
@test "(core) url (app ssl)" {
setup_test_tls
assert_url "https://dokku.me"
build_nginx_config
dokku proxy:build-config "$TEST_APP"
assert_url "https://${TEST_APP}.dokku.me"
}
@test "(core) urls (wildcard ssl)" {
setup_test_tls wildcard
assert_urls "https://dokku.me"
build_nginx_config
dokku proxy:build-config "$TEST_APP"
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me"
add_domain "test.dokku.me"
assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me" "https://${TEST_APP}.dokku.me" "https://test.dokku.me"

View File

@@ -532,12 +532,6 @@ add_requirements_txt() {
echo "flask" >>"$APP_REPO_DIR/requirements.txt"
}
build_nginx_config() {
# simulate nginx post-deploy
dokku domains:setup "$TEST_APP"
dokku proxy:build-config "$TEST_APP"
}
create_network() {
local NETWORK_NAME="$1:=$TEST_NETWORK"