* Made a separate Clixon datastore XML/JSON top-level symbol

* Replaces the hardcoded "config" keyword.
  * Implemented by a compile-time option called `DATASTORE_TOP_SYMBOL` option in clixon_custom.h
* Tests: added endtest to all tests. Removed all premature exits if BE=0
This commit is contained in:
Olof hagsand 2021-03-05 14:15:15 +01:00
parent 2ab90d847b
commit b7991d9b39
132 changed files with 939 additions and 628 deletions

View file

@ -73,15 +73,15 @@ EOF
# Create failsafe db
cat <<EOF > $dir/failsafe_db
<config>
<${DATASTORE_TOP}>
$SAMEXML
</config>
</${DATASTORE_TOP}>
EOF
# Create non-compat startup db
# startup config XML with following (A obsolete, B OK, C lacking)
cat <<EOF > $dir/non-compat-invalid.xml
<config>
<${DATASTORE_TOP}>
<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
<module-set-id>42</module-set-id>
<module>
@ -92,7 +92,7 @@ cat <<EOF > $dir/non-compat-invalid.xml
</modules-state>
$OLDXML
$SAMEXML
</config>
</${DATASTORE_TOP}>
EOF
(cd $dir; rm -f tmp_db candidate_db running_db startup_db) # remove databases
@ -147,7 +147,9 @@ if [ $BE -ne 0 ]; then
fi
# kill backend
stop_backend -f $cfg
rm -rf $dir
fi
rm -rf $dir
new "endtest"
endtest