save error in output if curl errors
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; output="$(curl -s -i -N -H \"Connection: Upgrade\" -H \"Upgrade: websocket\" -H \"Host: $1\" -H \"Origin: $1\" $1 -m 2)"; echo $output; test "$output" == "bazingaa"
|
||||
set -e; output="$(curl -s -S -i -N -H \"Connection: Upgrade\" -H \"Upgrade: websocket\" -H \"Host: $1\" -H \"Origin: $1\" $1 -m 2)"; echo $output; test "$output" == "bazingaa"
|
||||
|
||||
@@ -5,7 +5,7 @@ test_url () {
|
||||
path="$1"
|
||||
expected_output="$2"
|
||||
url="$base_url$path"
|
||||
output="$(curl -s "$url")"
|
||||
output="$(curl -s -S "$url")"
|
||||
echo "$output"
|
||||
test "$output" == "$expected_output"
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; test "$(curl -s "$1")" == "go"
|
||||
set -e; test "$(curl -s -S "$1")" == "go"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e; output="$(curl -s $1)"; echo $output; test "$output" == "Hello from Java!"
|
||||
set -e; output="$(curl -s -S $1)"; echo $output; test "$output" == "Hello from Java!"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; curl -s "$1" | grep -q "Heroku Multi Buildpack on Dokku"
|
||||
set -e; curl -s -S "$1" | grep -q "Heroku Multi Buildpack on Dokku"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; output="$(curl -s "$1")"; echo "$output"; test "$output" == "nodejs/express"
|
||||
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "nodejs/express"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; output="$(curl -s "$1")"; echo "$output"; test "$output" == "<html><h3>php</h3></html>"
|
||||
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "<html><h3>php</h3></html>"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; output="$(curl -s "$1")"; echo "$output"; test "$output" == "python/flask"
|
||||
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "python/flask"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
set -e; output="$(curl -s "$1")"; echo "$output"; test "$output" == "<html><h3>Static Page</h3></html>"
|
||||
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "<html><h3>Static Page</h3></html>"
|
||||
|
||||
Reference in New Issue
Block a user