@@ -222,13 +222,13 @@ assert_http_success() {
|
||||
assert_output "200"
|
||||
}
|
||||
|
||||
assert_http_localhost_success() {
|
||||
local scheme="$1" domain="$2" port="${3:-80}" path="${4:-}" content="${5:-}"
|
||||
assert_http_localhost_response() {
|
||||
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 "200"
|
||||
assert_output "$status_code"
|
||||
|
||||
if [[ -n "$content" ]]; then
|
||||
run curl --connect-to "$domain:$port:localhost:$port" -kSs "$scheme://$domain:$port$path"
|
||||
|
||||
Reference in New Issue
Block a user