Added error-info to netconf error-msg for duplicate leaf-lists
Test: removed potential duplicate user in nacm.sh
This commit is contained in:
parent
df2af320c2
commit
c9c5d4f813
6 changed files with 38 additions and 22 deletions
|
|
@ -18,6 +18,8 @@ APPNAME=example
|
|||
cfg=$dir/conf_yang.xml
|
||||
fyang=$dir/nacm-example.yang
|
||||
|
||||
NACMUSER=$(whoami)
|
||||
|
||||
cat <<EOF > $fyang
|
||||
module nacm-example{
|
||||
yang-version 1.1;
|
||||
|
|
@ -182,13 +184,13 @@ testrun except "" UNIX $dir/backend.sock "$OK" ""
|
|||
|
||||
# UNIX socket, myuser, loop mode. All should work
|
||||
new "Credentials: mode=none, fam=UNIX user=me"
|
||||
testrun none "$USER" UNIX $dir/backend.sock "$OK" ""
|
||||
testrun none "$NACMUSER" UNIX $dir/backend.sock "$OK" ""
|
||||
|
||||
new "Credentials: mode=exact, fam=UNIX user=me"
|
||||
testrun exact "$USER" UNIX $dir/backend.sock "$OK" ""
|
||||
testrun exact "$NACMUSER" UNIX $dir/backend.sock "$OK" ""
|
||||
|
||||
new "Credentials: mode=except, fam=UNIX user=me"
|
||||
testrun except "$USER" UNIX $dir/backend.sock "$OK" ""
|
||||
testrun except "$NACMUSER" UNIX $dir/backend.sock "$OK" ""
|
||||
|
||||
# UNIX socket, admin user. First should work
|
||||
new "Credentials: mode=none, fam=UNIX user=admin"
|
||||
|
|
@ -212,15 +214,17 @@ testrun except admin UNIX $dir/backend.sock "$OK" sudo
|
|||
|
||||
# IPv4 socket, admin user. First should work
|
||||
new "Credentials: mode=none, fam=UNIX user=admin sudo"
|
||||
testrun none $USER IPv4 127.0.0.1 "$OK" ""
|
||||
testrun none $NACMUSER IPv4 127.0.0.1 "$OK" ""
|
||||
|
||||
new "Credentials: mode=exact, fam=UNIX user=admin sudo"
|
||||
testrun exact $USER IPv4 127.0.0.1 "$ERROR" ""
|
||||
testrun exact $NACMUSER IPv4 127.0.0.1 "$ERROR" ""
|
||||
|
||||
new "Credentials: mode=except, fam=UNIX user=admin sudo"
|
||||
testrun except $USER IPv4 127.0.0.1 "$ERROR" ""
|
||||
testrun except $NACMUSER IPv4 127.0.0.1 "$ERROR" ""
|
||||
|
||||
rm -rf $dir
|
||||
|
||||
unset NACMUSER
|
||||
|
||||
new "endtest"
|
||||
endtest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue