revise testing: change expectfn -> extectpart etc

This commit is contained in:
Olof hagsand 2020-12-29 13:49:49 +01:00
parent 96ab7292b9
commit 41e23865a1
23 changed files with 186 additions and 241 deletions

View file

@ -201,13 +201,13 @@ new "cli show conf as guest"
expectpart "$($clixon_cli -1 -U guest -l o -f $cfg show conf)" 255 "application access-denied"
new "cli rpc as admin"
expectfn "$clixon_cli -1 -U andy -l o -f $cfg rpc ipv4" 0 '<x xmlns="urn:example:clixon">ipv4</x><y xmlns="urn:example:clixon">42</y>'
expectpart "$($clixon_cli -1 -U andy -l o -f $cfg rpc ipv4)" 0 '<x xmlns="urn:example:clixon">ipv4</x><y xmlns="urn:example:clixon">42</y>'
new "cli rpc as limited"
expectfn "$clixon_cli -1 -U wilma -l o -f $cfg rpc ipv4" 255 "access-denied default deny"
expectpart "$($clixon_cli -1 -U wilma -l o -f $cfg rpc ipv4)" 255 "access-denied default deny"
new "cli rpc as guest"
expectfn "$clixon_cli -1 -U guest -l o -f $cfg rpc ipv4" 255 "access-denied access denied"
expectpart "$($clixon_cli -1 -U guest -l o -f $cfg rpc ipv4)" 255 "access-denied access denied"
if [ $RC -ne 0 ]; then
new "Kill restconf daemon"