fix: correct tests for new domain initialization method

This commit is contained in:
Jose Diaz-Gonzalez committed 2022-12-01 22:39:38 -05:00
1 parent 9eab17af11
commit d18cb3766c
2 files changed
+4 -14

No files matched your search

+4 -8
View File
@@ -38,17 +38,15 @@ teardown() {
} }
@test "(core) urls (non-ssl)" { @test "(core) urls (non-ssl)" {
assert_urls "http://dokku.me"
build_nginx_config
assert_urls "http://${TEST_APP}.dokku.me" assert_urls "http://${TEST_APP}.dokku.me"
add_domain "test.dokku.me" add_domain "test.dokku.me"
assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me" assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me"
} }
@test "(core) urls (app ssl)" { @test "(core) urls (app ssl)" {
assert_urls "http://${TEST_APP}.dokku.me"
setup_test_tls setup_test_tls
assert_urls "https://dokku.me" dokku proxy:build-config "$TEST_APP"
build_nginx_config
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me" assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me"
add_domain "test.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" 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)" { @test "(core) url (app ssl)" {
setup_test_tls setup_test_tls
assert_url "https://dokku.me" dokku proxy:build-config "$TEST_APP"
build_nginx_config
assert_url "https://${TEST_APP}.dokku.me" assert_url "https://${TEST_APP}.dokku.me"
} }
@test "(core) urls (wildcard ssl)" { @test "(core) urls (wildcard ssl)" {
setup_test_tls wildcard setup_test_tls wildcard
assert_urls "https://dokku.me" dokku proxy:build-config "$TEST_APP"
build_nginx_config
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me" assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me"
add_domain "test.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" assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me" "https://${TEST_APP}.dokku.me" "https://test.dokku.me"
-6
View File
@@ -532,12 +532,6 @@ add_requirements_txt() {
echo "flask" >>"$APP_REPO_DIR/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() { create_network() {
local NETWORK_NAME="$1:=$TEST_NETWORK" local NETWORK_NAME="$1:=$TEST_NETWORK"