tests: run mvdan/shfmt on test runs

While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.

The command used to reprocess everything is:

```shell
shfmt -l -bn -ci -i 2 -w .
```
This commit is contained in:
Jose Diaz-Gonzalez
2019-01-07 01:04:17 -05:00
parent fb7c73a7e3
commit 86795ddacc
283 changed files with 1536 additions and 1018 deletions

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
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"
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

@@ -1,2 +1,6 @@
#!/usr/bin/env bash
set -e; sleep 5; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello World!"
set -e
sleep 5
output="$(curl -s -S "$1")"
echo "$output"
test "$output" == "Hello World!"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e;
set -e
test_url () {
test_url() {
path="$1"
expected_output="$2"
url="$base_url$path"

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -ex;
set -ex
REMOTE=$1
REPO=$2

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello World!"
set -e
output="$(curl -s -S "$1")"
echo "$output"
test "$output" == "Hello World!"

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -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,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "nodejs/express"
set -e
output="$(curl -s -S "$1")"
echo "$output"
test "$output" == "nodejs/express"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e;
set -e
test_url () {
test_url() {
path="$1"
expected_output="$2"
url="${base_url}:3000${path}"

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -ex;
set -ex
REMOTE=$1
REPO=$2

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello World!"
set -e
output="$(curl -s -S "$1")"
echo "$output"
test "$output" == "Hello World!"

View File

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

View File

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

View File

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

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -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,3 @@
#!/usr/bin/env bash
set -e; curl -s -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,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -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,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -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,5 @@
#!/usr/bin/env bash
set -e; output="$(pgrep -f "node worker.js" | wc -l)"; echo "$output"; test "$output" == "1"
set -e
output="$(pgrep -f "node worker.js" | wc -l)"
echo "$output"
test "$output" == "1"

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -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,7 +1,7 @@
#!/usr/bin/env bash
set -e;
set -e
base_url=$1
test_url () {
test_url() {
path="$1"
expected_output="$2"
url="${base_url}${path}"

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -ex;
set -ex
REMOTE=$1
REPO=$2

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello, world"
set -e
output="$(curl -s -S "$1")"
echo "$output"
test "$output" == "Hello, world"

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -S "$1")"; echo "$output"; test "$output" == "Hello from Scala!"
set -e
output="$(curl -s -S "$1")"
echo "$output"
test "$output" == "Hello from Scala!"

View File

@@ -1,2 +1,5 @@
#!/usr/bin/env bash
set -e; output="$(curl -s -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>"