Added RCLOG for redirecting restconf logs at tests; with-restconf error in example
This commit is contained in:
parent
f02310dcef
commit
860c0c042d
16 changed files with 36 additions and 19 deletions
|
|
@ -32,6 +32,10 @@ testname=
|
|||
# If set, enable debugging (of backend)
|
||||
: ${DBG:=0}
|
||||
|
||||
# Where to log restconf. Some systems may not have syslog,
|
||||
# eg logging to a file: RCLOG="-l f/www-data/restconf.log"
|
||||
: ${RCLOG:=}
|
||||
|
||||
# If reset, do NOT run tests with external yang models.
|
||||
# This involves downloading
|
||||
# https://github.com/openconfig/public and https://github.com/YangModels/yang
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data clixon_restconf
|
||||
|
||||
new "start restconf daemon"
|
||||
sudo su -c "$clixon_restconf -f $cfg -y $fyang -D $DBG" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $RCLOG $cfg -y $fyang -D $DBG" -s /bin/sh www-data &
|
||||
|
||||
# First vanilla (protocol) case
|
||||
new "netconf validate empty"
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
|||
|
||||
sleep 1
|
||||
new "start restconf daemon (-a is enable basic authentication)"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG -- -a" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG -- -a" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
||||
|
||||
new "start restconf daemon (-a is enable http basic auth)"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG -- -a" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG -- -a" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
|||
|
||||
sleep 1
|
||||
new "start restconf daemon (-a is enable basic authentication)"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG -- -a" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG -- -a" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
|||
|
||||
sleep 1
|
||||
new "start restconf daemon (-a is enable basic authentication)"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG -- -a" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG -- -a" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
|||
|
||||
sleep 1
|
||||
new "start restconf daemon (-a is enable basic authentication)"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG -- -a" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG -- -a" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
||||
|
||||
new "start restconf daemon"
|
||||
sudo su -c "$clixon_restconf -f $cfg -y $fyang -D $DBG" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg -y $fyang $RCLOG -D $DBG" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data clixon_restconf
|
||||
|
||||
new "start restconf daemon"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
||||
|
||||
new "start restconf daemon"
|
||||
sudo su -c "$clixon_restconf -f $cfg -y $fyang -D $DBG" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg -y $fyang $RCLOG -D $DBG" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data clixon_restconf
|
||||
|
||||
new "start restconf daemon"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data -f "/www-data/clixon_restconf"
|
||||
|
||||
new "start restconf daemon"
|
||||
sudo su -c "$clixon_restconf -f $cfg -y $fyang -D $DBG" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg -y $fyang $RCLOG -D $DBG" -s /bin/sh www-data &
|
||||
|
||||
sleep $RCWAIT
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ new "kill old restconf daemon"
|
|||
sudo pkill -u www-data clixon_restconf
|
||||
|
||||
new "start restconf daemon"
|
||||
sudo su -c "$clixon_restconf -f $cfg -D $DBG" -s /bin/sh www-data &
|
||||
sudo su -c "$clixon_restconf -f $cfg $RCLOG -D $DBG" -s /bin/sh www-data &
|
||||
|
||||
new "netconf set x in example1"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 '<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config><target><candidate/></target><config><x xmlns="urn:example:clixon1">42</x></config></edit-config></rpc>]]>]]>' '^<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>]]>]]>$'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue