Don't loop forever

This commit is contained in:
Alex Ellis 2017-04-13 22:40:29 +01:00
parent f41a676fc2
commit 2575ef407d

View File

@ -1,7 +1,7 @@
#!/bin/sh
function test_gateway {
while [ true ]
for i in {1..100}
do
curl -s localhost:8080 |grep "angular"
@ -19,7 +19,7 @@ echo
}
function test_function_output {
while [ true ]
for i in {1..100}
do
out=$(curl -s localhost:8080/function/$1 -d "$2")
echo $out
@ -39,7 +39,7 @@ echo
function test_function {
while [ true ]
for i in {1..100}
do
curl localhost:8080/function/$1 -d "$2"
if [ ! 0 -eq $? ]
@ -56,6 +56,10 @@ echo
}
function create_function {
echo "Creating function: " $1
curl -s localhost:8080/system/functions -d "$1"
}
test_gateway
@ -64,6 +68,6 @@ test_function func_webhookstash hi
test_function func_base64 hi
test_function func_markdown "*salut*"
curl localhost:8080/system/functions -d '{"service": "stronghash", "image": "functions/alpine", "envProcess": "sha512sum", "network": "func_functions"}'
create_function '{"service": "stronghash", "image": "functions/alpine", "envProcess": "sha512sum", "network": "func_functions"}'
test_function_output stronghash "hi" "150a14ed5bea6cc731cf86c41566ac427a8db48ef1b9fd626664b3bfbb99071fa4c922f33dde38719b8c8354e2b7ab9d77e0e67fc12843920a712e73d558e197 -"