fix: correct testcase for metabase deploy
This commit is contained in:
@@ -55,5 +55,10 @@ teardown_() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
assert_http_localhost_response "http" "$TEST_APP.dokku.me" "80" "" "python/http.server"
|
run /bin/bash -c "sleep 30"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
assert_http_localhost_response_contains "http" "$TEST_APP.dokku.me" "80" "" "<title>Metabase</title>"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,6 +238,22 @@ assert_http_localhost_response() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert_http_localhost_response_contains() {
|
||||||
|
local scheme="$1" domain="$2" port="${3:-80}" path="${4:-}" content="${5:-}" status_code="${6:-200}"
|
||||||
|
run curl --connect-to "$domain:$port:localhost:$port" -kSso /dev/null -w "%{http_code}" "$scheme://$domain:$port$path"
|
||||||
|
echo "curl: curl --connect-to $domain:$port:localhost:$port -kSso /dev/null -w %{http_code} $scheme://$domain:$port$path"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_output "$status_code"
|
||||||
|
|
||||||
|
if [[ -n "$content" ]]; then
|
||||||
|
run curl --connect-to "$domain:$port:localhost:$port" -kSs "$scheme://$domain:$port$path"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_output_contains "$content"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
assert_ssl_domain() {
|
assert_ssl_domain() {
|
||||||
local domain=$1
|
local domain=$1
|
||||||
assert_app_domain "${domain}"
|
assert_app_domain "${domain}"
|
||||||
|
|||||||
Reference in New Issue
Block a user