skip parts of nacm_recovery test when user runs as root
This commit is contained in:
parent
f7e44185a5
commit
6d38603a79
2 changed files with 4 additions and 3 deletions
|
|
@ -88,7 +88,7 @@ EOF
|
||||||
# - test_order.sh XXX this is a bug need debugging
|
# - test_order.sh XXX this is a bug need debugging
|
||||||
cat <<EOF > /usr/local/bin/test/site.sh
|
cat <<EOF > /usr/local/bin/test/site.sh
|
||||||
# Add your local site specific env variables (or tests) here.
|
# Add your local site specific env variables (or tests) here.
|
||||||
SKIPLIST="test_api.sh test_c++.sh test_yangmodels.sh test_openconfig.sh test_install.sh test_nacm_recovery.sh test_privileges.sh"
|
SKIPLIST="test_api.sh test_c++.sh test_yangmodels.sh test_openconfig.sh test_install.sh test_privileges.sh"
|
||||||
#IETFRFC=
|
#IETFRFC=
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ EOF
|
||||||
# The rule-list is from A.2
|
# The rule-list is from A.2
|
||||||
RULES='<x xmlns="urn:example:nacm">0</x><nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"><enable-nacm>true</enable-nacm><read-default>permit</read-default><write-default>permit</write-default><exec-default>permit</exec-default><enable-external-groups>true</enable-external-groups></nacm>'
|
RULES='<x xmlns="urn:example:nacm">0</x><nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"><enable-nacm>true</enable-nacm><read-default>permit</read-default><write-default>permit</write-default><exec-default>permit</exec-default><enable-external-groups>true</enable-external-groups></nacm>'
|
||||||
|
|
||||||
|
|
||||||
DEFAULT='<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"><enable-nacm>true</enable-nacm><read-default>permit</read-default><write-default>deny</write-default><exec-default>permit</exec-default><enable-external-groups>true</enable-external-groups></nacm>'
|
DEFAULT='<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"><enable-nacm>true</enable-nacm><read-default>permit</read-default><write-default>deny</write-default><exec-default>permit</exec-default><enable-external-groups>true</enable-external-groups></nacm>'
|
||||||
|
|
||||||
# Arguments:
|
# Arguments:
|
||||||
|
|
@ -149,6 +148,7 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
#------- CRED: except USER: non-root
|
#------- CRED: except USER: non-root
|
||||||
|
if [ "$USER" != root ]; then # Skip if USER is root
|
||||||
# This is default, therefore first
|
# This is default, therefore first
|
||||||
CRED=except
|
CRED=except
|
||||||
REALUSER=$USER
|
REALUSER=$USER
|
||||||
|
|
@ -176,6 +176,8 @@ RECOVERY=$USER
|
||||||
new "cred: $CRED realuser:$REALUSER pseudo:$PSEUDO recovery:$RECOVERY"
|
new "cred: $CRED realuser:$REALUSER pseudo:$PSEUDO recovery:$RECOVERY"
|
||||||
testrun $CRED $REALUSER $PSEUDO $RECOVERY false false
|
testrun $CRED $REALUSER $PSEUDO $RECOVERY false false
|
||||||
|
|
||||||
|
fi # skip is USER is root
|
||||||
|
|
||||||
#------- CRED: except USER: root
|
#------- CRED: except USER: root
|
||||||
CRED=except
|
CRED=except
|
||||||
REALUSER=root
|
REALUSER=root
|
||||||
|
|
@ -203,7 +205,6 @@ RECOVERY=root
|
||||||
new "cred: $CRED realuser:$REALUSER pseudo:$PSEUDO recovery:$RECOVERY"
|
new "cred: $CRED realuser:$REALUSER pseudo:$PSEUDO recovery:$RECOVERY"
|
||||||
testrun $CRED $REALUSER $PSEUDO $RECOVERY true false
|
testrun $CRED $REALUSER $PSEUDO $RECOVERY true false
|
||||||
|
|
||||||
|
|
||||||
#------- CRED: none
|
#------- CRED: none
|
||||||
# Check you can use any pseudo user if cred is none
|
# Check you can use any pseudo user if cred is none
|
||||||
CRED=none
|
CRED=none
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue