refactor: simplify how url generation works
The URLS file is no longer necessary as urls are now generated directly from the app VHOST file. This also moves all the url generation logic to the domains plugin.
This commit is contained in:
@@ -39,33 +39,72 @@ teardown() {
|
||||
|
||||
@test "(core) urls (non-ssl)" {
|
||||
assert_urls "http://${TEST_APP}.dokku.me"
|
||||
add_domain "test.dokku.me"
|
||||
dokku domains:add $TEST_APP "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
|
||||
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"
|
||||
|
||||
run setup_test_tls
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
assert_urls "https://${TEST_APP}.dokku.me"
|
||||
|
||||
run /bin/bash -c "dokku domains:add $TEST_APP test.dokku.me"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me" "https://test.dokku.me" "http://test.dokku.me"
|
||||
}
|
||||
|
||||
@test "(core) url (app ssl)" {
|
||||
setup_test_tls
|
||||
dokku proxy:build-config "$TEST_APP"
|
||||
run setup_test_tls
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
assert_url "https://${TEST_APP}.dokku.me"
|
||||
}
|
||||
|
||||
@test "(core) urls (wildcard ssl)" {
|
||||
setup_test_tls wildcard
|
||||
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"
|
||||
add_domain "dokku.example.com"
|
||||
assert_urls "http://dokku.example.com" "http://${TEST_APP}.dokku.me" "http://test.dokku.me" "https://dokku.example.com" "https://${TEST_APP}.dokku.me" "https://test.dokku.me"
|
||||
run setup_test_tls wildcard
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
assert_urls "https://${TEST_APP}.dokku.me"
|
||||
|
||||
run /bin/bash -c "dokku domains:add $TEST_APP test.dokku.me"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me" "https://test.dokku.me" "http://test.dokku.me"
|
||||
|
||||
run /bin/bash -c "dokku domains:add $TEST_APP dokku.example.com"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_urls "http://dokku.example.com" "http://${TEST_APP}.dokku.me" "https://dokku.example.com" "https://${TEST_APP}.dokku.me" "https://test.dokku.me" "http://test.dokku.me"
|
||||
}
|
||||
|
||||
@test "(core) git-remote (off-port)" {
|
||||
|
||||
Reference in New Issue
Block a user