mirror of
https://github.com/openfaas/faas.git
synced 2025-06-12 02:06:46 +00:00
Don't loop forever
This commit is contained in:
parent
f41a676fc2
commit
2575ef407d
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
function test_gateway {
|
function test_gateway {
|
||||||
while [ true ]
|
for i in {1..100}
|
||||||
do
|
do
|
||||||
|
|
||||||
curl -s localhost:8080 |grep "angular"
|
curl -s localhost:8080 |grep "angular"
|
||||||
@ -19,7 +19,7 @@ echo
|
|||||||
}
|
}
|
||||||
|
|
||||||
function test_function_output {
|
function test_function_output {
|
||||||
while [ true ]
|
for i in {1..100}
|
||||||
do
|
do
|
||||||
out=$(curl -s localhost:8080/function/$1 -d "$2")
|
out=$(curl -s localhost:8080/function/$1 -d "$2")
|
||||||
echo $out
|
echo $out
|
||||||
@ -39,7 +39,7 @@ echo
|
|||||||
|
|
||||||
|
|
||||||
function test_function {
|
function test_function {
|
||||||
while [ true ]
|
for i in {1..100}
|
||||||
do
|
do
|
||||||
curl localhost:8080/function/$1 -d "$2"
|
curl localhost:8080/function/$1 -d "$2"
|
||||||
if [ ! 0 -eq $? ]
|
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
|
test_gateway
|
||||||
|
|
||||||
@ -64,6 +68,6 @@ test_function func_webhookstash hi
|
|||||||
test_function func_base64 hi
|
test_function func_base64 hi
|
||||||
test_function func_markdown "*salut*"
|
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 -"
|
test_function_output stronghash "hi" "150a14ed5bea6cc731cf86c41566ac427a8db48ef1b9fd626664b3bfbb99071fa4c922f33dde38719b8c8354e2b7ab9d77e0e67fc12843920a712e73d558e197 -"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user