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
22 lines
391 B
Bash
Executable File
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 |