test scripts: separated wait of backend and restconf starts

This commit is contained in:
Olof Hagsand 2019-10-27 15:54:16 +00:00
parent 948e203a61
commit 82356b7450
24 changed files with 71 additions and 25 deletions

View file

@ -163,6 +163,8 @@ if [ $BE -ne 0 ]; then
new "start backend -s init -f $cfg"
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -171,7 +173,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
# mandatory-leaf See RFC7950 Sec 7.17

View file

@ -117,6 +117,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -124,7 +127,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
# First vanilla (protocol) case

View file

@ -151,6 +151,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -159,7 +162,6 @@ start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "Set crypto to aes"
expecteof "$clixon_netconf -qf $cfg" 0 '<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config><target><candidate/></target><config><crypto xmlns="urn:example:my-crypto">aes</crypto></config></edit-config></rpc>]]>]]>' '^<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>]]>]]>$'

View file

@ -123,6 +123,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -130,7 +133,6 @@ new "start restconf daemon (-a is enable basic authentication)"
start_restconf -f $cfg -- -a
new "waiting"
wait_backend
wait_restconf
new "auth get"

View file

@ -99,6 +99,9 @@ EOF
sleep $BETIMEOUT
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -106,7 +109,6 @@ EOF
start_restconf -f $cfg -- -a
new "waiting"
wait_backend
wait_restconf
#----------- First get

View file

@ -143,6 +143,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg -- -s
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -150,7 +153,6 @@ new "start restconf daemon (-a is enable http basic auth)"
start_restconf -f $cfg -- -a
new "waiting"
wait_backend
wait_restconf
new "auth get"

View file

@ -137,6 +137,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg -- -s
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -145,7 +148,6 @@ start_restconf -f $cfg -- -a
new "waiting"
wait_backend
wait_restconf
new "auth set authentication config"
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc><edit-config><target><candidate/></target><config>$RULES</config></edit-config></rpc>]]>]]>" "^<rpc-reply><ok/></rpc-reply>]]>]]>$"

View file

@ -145,6 +145,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -152,7 +155,6 @@ new "start restconf daemon (-a is enable basic authentication)"
start_restconf -f $cfg -- -a
new "waiting"
wait_backend
wait_restconf
# Set nacm from scratch

View file

@ -146,6 +146,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -153,7 +156,6 @@ new "start restconf daemon (-a is enable basic authentication)"
start_restconf -f $cfg -- -a
new "waiting"
wait_backend
wait_restconf
new "auth set authentication config"

View file

@ -79,6 +79,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg -- -s
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -86,7 +89,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "generate 'large' config with $perfnr list entries"

View file

@ -57,6 +57,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg -- -s
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -64,7 +67,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "generate 'large' config with $perfnr list entries"

View file

@ -79,6 +79,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -86,7 +89,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "restconf POST tree without key"

View file

@ -125,6 +125,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -132,7 +135,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "restconf POST initial tree"

View file

@ -74,6 +74,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f "$cfg" -- -s
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -81,7 +84,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "B.1.1. Retrieve the Top-Level API Resource root"

View file

@ -77,6 +77,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -84,7 +87,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "restconf PUT add whole list entry"

View file

@ -105,6 +105,9 @@ if [ $BE -ne 0 ]; then
start_backend -s startup -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -112,7 +115,6 @@ new "start restconf daemon (-a is enable basic authentication)"
start_restconf -f $cfg -- -a
new "waiting"
wait_backend
wait_restconf
# also in test_restconf.sh

View file

@ -61,6 +61,9 @@ testrun(){
start_backend -s init -f $cfg -y $fyang $option
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -68,7 +71,6 @@ testrun(){
start_restconf -f $cfg -y $fyang $option
new "waiting"
wait_backend
wait_restconf
new "restconf put 42"

View file

@ -43,6 +43,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -50,10 +53,8 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "rpc tests"
# 1.First some positive tests vary media types

View file

@ -114,6 +114,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -121,7 +124,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
#

View file

@ -159,6 +159,9 @@ if [ $BE -ne 0 ]; then
start_backend -s init -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -166,7 +169,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "netconfig edit main module"

View file

@ -255,6 +255,9 @@ if [ $BE -ne 0 ]; then
start_backend -s $mode -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -262,7 +265,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "Check running db content"

View file

@ -266,6 +266,9 @@ testrun(){
start_backend -s startup -f $cfg -- -u
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -273,7 +276,6 @@ testrun(){
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "Check running db content"

View file

@ -113,6 +113,9 @@ if [ $BE -ne 0 ]; then
start_backend -s $mode -f $cfg
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -120,7 +123,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "Check running db content is failsafe"

View file

@ -76,6 +76,9 @@ if [ $BE -ne 0 ]; then
fi
fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser clixon_restconf
@ -83,7 +86,6 @@ new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_backend
wait_restconf
new "netconf set x in example1"