tests: fix issue with assert urls
This commit is contained in:
1 parent
f5e55540e9
commit
627a6bf8a5
3 files changed
+10
-10
No files matched your search
@@ -917,7 +917,7 @@ get_app_urls() {
|
|||||||
if [[ -n "$urls" ]]; then
|
if [[ -n "$urls" ]]; then
|
||||||
echo "$urls" | sort
|
echo "$urls" | sort
|
||||||
else
|
else
|
||||||
internal_get_app_urls "$URL_TYPE" "$APP"
|
internal_get_app_urls "$URL_TYPE" "$APP" | sort
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ teardown() {
|
|||||||
build_nginx_config
|
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.dokku.me" "http://${TEST_APP}.dokku.me"
|
assert_urls "http://${TEST_APP}.dokku.me" "http://test.dokku.me"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(core) urls (app ssl)" {
|
@test "(core) urls (app ssl)" {
|
||||||
@@ -71,7 +71,7 @@ teardown() {
|
|||||||
build_nginx_config
|
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.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)" {
|
@test "(core) url (app ssl)" {
|
||||||
@@ -87,9 +87,9 @@ teardown() {
|
|||||||
build_nginx_config
|
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.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"
|
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)" {
|
@test "(core) git-remote (off-port)" {
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ assert_not_external_port() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert_url() {
|
assert_url() {
|
||||||
url=$1
|
url="$1"
|
||||||
run /bin/bash -c "dokku url $TEST_APP"
|
run /bin/bash -c "dokku url $TEST_APP"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
@@ -299,12 +299,12 @@ assert_url() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert_urls() {
|
assert_urls() {
|
||||||
urls=("$@")
|
urls="$@"
|
||||||
run /bin/bash -c "dokku urls $TEST_APP"
|
run /bin/bash -c "dokku urls $TEST_APP | xargs"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
echo "urls:" "$(tr ' ' '\n' <<<"${urls}" | sort)"
|
echo "urls:" "$urls"
|
||||||
assert_output < <(tr ' ' '\n' <<<"${urls}" | sort)
|
assert_output "$urls"
|
||||||
}
|
}
|
||||||
|
|
||||||
deploy_app() {
|
deploy_app() {
|
||||||
|
|||||||
Reference in new issue
Block a user