tests: fix issue with assert urls
This commit is contained in:
@@ -917,7 +917,7 @@ get_app_urls() {
|
||||
if [[ -n "$urls" ]]; then
|
||||
echo "$urls" | sort
|
||||
else
|
||||
internal_get_app_urls "$URL_TYPE" "$APP"
|
||||
internal_get_app_urls "$URL_TYPE" "$APP" | sort
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ teardown() {
|
||||
build_nginx_config
|
||||
assert_urls "http://${TEST_APP}.dokku.me"
|
||||
add_domain "test.dokku.me"
|
||||
assert_urls "http://test.dokku.me" "http://${TEST_APP}.dokku.me"
|
||||
assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me"
|
||||
}
|
||||
|
||||
@test "(core) urls (app ssl)" {
|
||||
@@ -71,7 +71,7 @@ teardown() {
|
||||
build_nginx_config
|
||||
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me"
|
||||
add_domain "test.dokku.me"
|
||||
assert_urls "http://test.dokku.me" "http://${TEST_APP}.dokku.me" "https://test.dokku.me" "https://${TEST_APP}.dokku.me"
|
||||
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)" {
|
||||
@@ -87,9 +87,9 @@ teardown() {
|
||||
build_nginx_config
|
||||
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me"
|
||||
add_domain "test.dokku.me"
|
||||
assert_urls "http://test.dokku.me" "http://${TEST_APP}.dokku.me" "https://test.dokku.me" "https://${TEST_APP}.dokku.me"
|
||||
assert_urls "http://${TEST_APP}.dokku.me" "https://${TEST_APP}.dokku.me" "https://test.dokku.me" "http://test.dokku.me"
|
||||
add_domain "dokku.example.com"
|
||||
assert_urls "http://dokku.example.com" "http://test.dokku.me" "http://${TEST_APP}.dokku.me" "https://dokku.example.com" "https://test.dokku.me" "https://${TEST_APP}.dokku.me"
|
||||
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)" {
|
||||
|
||||
@@ -290,7 +290,7 @@ assert_not_external_port() {
|
||||
}
|
||||
|
||||
assert_url() {
|
||||
url=$1
|
||||
url="$1"
|
||||
run /bin/bash -c "dokku url $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -299,12 +299,12 @@ assert_url() {
|
||||
}
|
||||
|
||||
assert_urls() {
|
||||
urls=("$@")
|
||||
run /bin/bash -c "dokku urls $TEST_APP"
|
||||
urls="$@"
|
||||
run /bin/bash -c "dokku urls $TEST_APP | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
echo "urls:" "$(tr ' ' '\n' <<<"${urls}" | sort)"
|
||||
assert_output < <(tr ' ' '\n' <<<"${urls}" | sort)
|
||||
echo "urls:" "$urls"
|
||||
assert_output "$urls"
|
||||
}
|
||||
|
||||
deploy_app() {
|
||||
|
||||
Reference in New Issue
Block a user