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