diff --git a/test/test_restconf_internal.sh b/test/test_restconf_internal.sh index ed410dfd..5c2a7c09 100755 --- a/test/test_restconf_internal.sh +++ b/test/test_restconf_internal.sh @@ -182,7 +182,7 @@ new "wait backend" wait_backend # For debug ->&2 echo "curl $CURLOPTS -X POST -H \"Content-Type: application/yang-data+json\" $RCPROTO://localhost/restconf/operations/clixon-lib:process-control -d '{\"clixon-lib:input\":{\"name\":\"restconf\",\"operation\":\"status\"}}'" +#>&2 echo "curl $CURLOPTS -X POST -H \"Content-Type: application/yang-data+json\" $RCPROTO://localhost/restconf/operations/clixon-lib:process-control -d '{\"clixon-lib:input\":{\"name\":\"restconf\",\"operation\":\"status\"}}'" # Get pid of running process and check return xml new "1. Get rpc status" diff --git a/test/test_restconf_internal_usecases.sh b/test/test_restconf_internal_usecases.sh index ec399942..0c2fa594 100755 --- a/test/test_restconf_internal_usecases.sh +++ b/test/test_restconf_internal_usecases.sh @@ -117,6 +117,7 @@ EOF if [ -z "$pid" ]; then err "No pid return value" "$retx" fi +echo "retx:$retx" if $active; then expect="^$activeClixon RESTCONF process/.*/clixon_restconf -f $cfg -D [0-9] -l ${LOGDST_CMD}$status20[0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9]*Z$pid]]>]]>$" else @@ -162,19 +163,23 @@ new "1. get status" rpcstatus false stopped if [ $pid -ne 0 ]; then err "Pid" "$pid"; fi - - new "enable minimal restconf, no server" expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO$RESTCONFIG1]]>]]>" "^]]>]]>$" new "commit minimal server" expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO]]>]]>" "^]]>]]>$" +echo "pid:$pid" +ps aux|grep clixon_ + new "2. get status, get pid1" rpcstatus true running pid1=$pid if [ $pid1 -eq 0 ]; then err "Pid" 0; fi +echo "pid1:$pid1" +ps aux|grep clixon_ + new "Check $pid1 exists" while sudo kill -0 $pid1 2> /dev/null; do new "kill $pid1 externally" @@ -182,6 +187,9 @@ while sudo kill -0 $pid1 2> /dev/null; do sleep $DEMSLEEP done +echo "pid1:$pid1" +ps aux|grep clixon_ + new "3. get status: Check killed" rpcstatus false stopped if [ $pid -ne 0 ]; then err "Pid" "$pid"; fi