Files
fission-src/test/tests/test_fn_update/fnupdate_utils.sh
T
VishalandGitHub a23f8acffc Tests for function update (#550)
Tests for updates to a function of new deployment executor type. Tests check for changes in the environment, scale, secrets etc. Also checks conversion of function executor type from new deployment to pool manager and vice versa
2018-03-28 20:32:04 +05:30

22 lines
391 B
Bash
Executable File

#!/bin/bash
#
# Common methods used for testing function update
#
set -euo pipefail
test_fn() {
echo "Doing an HTTP GET on the function's route"
echo "Checking for valid response"
while true; do
response0=$(curl http://$FISSION_ROUTER/$1)
echo $response0 | grep -i $2
if [[ $? -eq 0 ]]; then
break
fi
sleep 1
done
}
export -f test_fn