save error in output if curl errors

This commit is contained in:
Michael Hobbs
2014-12-14 15:31:46 -08:00
parent 779808f832
commit 8025657a38
9 changed files with 9 additions and 9 deletions

View File

@@ -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"

View File

@@ -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"
}

View File

@@ -1,2 +1,2 @@
#!/bin/bash
set -e; test "$(curl -s "$1")" == "go"
set -e; test "$(curl -s -S "$1")" == "go"

View File

@@ -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!"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>"

View File

@@ -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"

View File

@@ -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>"