Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc

This commit is contained in:
Olof hagsand 2020-06-21 15:49:46 +02:00
parent 126cc209f4
commit 3af184c655
37 changed files with 340 additions and 274 deletions

View file

@ -161,14 +161,16 @@ fi
new "waiting"
wait_backend
new "kill old restconf daemon"
sudo pkill -u $wwwuser -f clixon_restconf
if [ $RC -ne 0 ]; then
new "kill old restconf daemon"
stop_restconf_pre
new "start restconf daemon"
start_restconf -f $cfg
new "start restconf daemon"
start_restconf -f $cfg
new "waiting"
wait_restconf
new "waiting"
wait_restconf
fi
new "netconfig edit main module"
expecteof "$clixon_netconf -qf $cfg" 0 '<rpc><edit-config><target><candidate/></target><config><main xmlns="urn:example:clixon"><x>foo</x><ext>foo</ext></main></config></edit-config></rpc>]]>]]>' "^<rpc-reply><ok/></rpc-reply>]]>]]>$"
@ -216,8 +218,10 @@ expectpart "$(curl -sik -X POST -H "Content-Type: application/yang-data+json" $R
new "restconf check main/sub1/sub2 contents"
expectpart "$(curl -sik -X GET $RCPROTO://localhost/restconf/data?content=config)" 0 'HTTP/1.1 200 OK' '{"data":{"main:main":{"ext":"foo","x":"foo"},"main:sub1":{"ext1":"foo","x":"foo"},"main:sub2":{"ext2":"foo","x":"foo"}}}'
new "Kill restconf daemon"
stop_restconf
if [ $RC -ne 0 ]; then
new "Kill restconf daemon"
stop_restconf
fi
if [ $BE -eq 0 ]; then
exit # BE