Wait for small time to avoid timeout in specs tests (#2052)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
source $(dirname $0)/../../../utils.sh
|
||||
|
||||
env_p=nodep
|
||||
fn_p=nodehellop
|
||||
@@ -19,19 +20,23 @@ pushd $(dirname $0)
|
||||
|
||||
fission spec apply
|
||||
|
||||
log "Waiting for changes to reflect"
|
||||
sleep 5
|
||||
|
||||
fission fn list | grep $fn_p
|
||||
fission fn test --name $fn_p
|
||||
|
||||
fission fn list | grep $fn_nd
|
||||
fission fn test --name $fn_nd
|
||||
|
||||
hnd=$(kubectl -n $FUNCTION_NAMESPACE get deployment -l=functionName=$fn_nd -ojsonpath='{.items[0].spec.template.spec.hostname}')
|
||||
|
||||
if [[ "${hnd}" == "foo-bar" ]]
|
||||
then
|
||||
echo "Hostname matches for newdeployment function, podspec test 1/2 passsed"
|
||||
fi
|
||||
if [[ "${hnd}" == "foo-bar" ]]; then
|
||||
echo "Hostname matches for newdeployment function, podspec test 1/2 passsed"
|
||||
fi
|
||||
|
||||
hnp=$(kubectl -n $FUNCTION_NAMESPACE get deployment -l=environmentName=$env_p -ojsonpath='{.items[0].spec.template.spec.hostname}')
|
||||
|
||||
if [[ "${hnp}" == "foo-bar" ]]
|
||||
then
|
||||
echo "Hostname matches for poolmgr function, podspec test 2/2 passsed"
|
||||
fi
|
||||
if [[ "${hnp}" == "foo-bar" ]]; then
|
||||
echo "Hostname matches for poolmgr function, podspec test 2/2 passsed"
|
||||
fi
|
||||
|
||||
@@ -40,6 +40,9 @@ fission fn create --spec --name $fn --env $env --deploy "multifile/*" --entrypoi
|
||||
log "Applying specs"
|
||||
fission spec apply
|
||||
|
||||
log "Waiting for changes to reflect"
|
||||
sleep 5
|
||||
|
||||
log "Checking function's existance"
|
||||
fission fn list | grep $fn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user