diff --git a/go-api/fail b/go-api/fail new file mode 100755 index 0000000..3364b29 --- /dev/null +++ b/go-api/fail @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .env + +STATUS_CODE="${1:-500}" + +: "${API_PORT:=8000}" + +curl --silent --show-error --verbose "http://localhost:$API_PORT" \ + --header "force-fail: $STATUS_CODE" diff --git a/go-api/success b/go-api/success new file mode 100755 index 0000000..a9ddcca --- /dev/null +++ b/go-api/success @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .env + +: "${API_PORT:=8000}" + +curl --silent --show-error --verbose "http://localhost:$API_PORT"