github actions: debug wait backend/restconf

This commit is contained in:
Olof hagsand 2021-06-16 14:39:28 +02:00
parent c814b809bb
commit 8bd0aa82d6
2 changed files with 8 additions and 9 deletions

View file

@ -337,12 +337,12 @@ function wait_backend(){
reply=$(echo "<rpc $DEFAULTNS><ping $LIBNS/></rpc>]]>]]>" | $clixon_netconf -qef $cfg 2> /dev/null)
let i=0;
while [[ $reply != "<rpc-reply"* ]]; do
# echo "sleep $DEMSLEEP"
echo "sleep $DEMSLEEP"
sleep $DEMSLEEP
reply=$(echo "<rpc $ÐEFAULTSNS $LIBNS><ping/></rpc>]]>]]>" | clixon_netconf -qef $cfg 2> /dev/null)
# echo "reply:$reply"
echo "reply:$reply"
let i++;
# echo "wait_backend $i"
echo "wait_backend $i"
if [ $i -ge $DEMLOOP ]; then
err "backend timeout $DEMWAIT seconds"
fi
@ -382,18 +382,18 @@ function stop_restconf(){
# Reasons for not working: if you run native is nginx running?
# @note assumes port=80 if RCPROTO=http and port=443 if RCPROTO=https
function wait_restconf(){
# echo "curl $CURLOPTS $* $RCPROTO://localhost/restconf"
echo "curl $CURLOPTS $* $RCPROTO://localhost/restconf"
hdr=$(curl $CURLOPTS $* $RCPROTO://localhost/restconf 2> /dev/null)
# echo "hdr:\"$hdr\""
echo "hdr:\"$hdr\""
let i=0;
while [[ $hdr != *"200"* ]]; do
# echo "wait_restconf $i"
echo "wait_restconf $i"
if [ $i -ge $DEMLOOP ]; then
err1 "restconf timeout $DEMWAIT seconds"
fi
sleep $DEMSLEEP
hdr=$(curl $CURLOPTS $* $RCPROTO://localhost/restconf 2> /dev/null)
# echo "hdr:\"$hdr\""
echo "hdr:\"$hdr\""
let i++;
done
if [ $valgrindtest -eq 3 ]; then

View file

@ -198,8 +198,7 @@ if [ $BE -ne 0 ]; then
err
fi
new "start backend -s init -f $cfg"
sudo $clixon_backend -F -D 1 -l e -s init -f $cfg
# start_backend -s init -f $cfg
start_backend -s init -f $cfg -D 1 -l e
fi
new "wait backend"