Test: mem.sh rm files, rm commit tests from datastore_multi
This commit is contained in:
parent
5b8828c530
commit
78cd42c15d
5 changed files with 10 additions and 40 deletions
|
|
@ -102,7 +102,7 @@ restconf_reply_header(void *req0,
|
|||
*/
|
||||
if (rc->rc_proto == HTTP_2){ // NO http/2
|
||||
if (strcmp(name, "Connection") == 0){
|
||||
clixon_debug(CLIXON_DBG_RESTCONF, "Skip: %s: %s", name, value);
|
||||
clixon_debug(CLIXON_DBG_RESTCONF, "Skip: %s", name);
|
||||
goto ok;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ function memonce(){
|
|||
if [ $testnr != 0 ]; then echo; fi
|
||||
perfnr=1000 # Limit performance tests
|
||||
testfile=$test
|
||||
# clear test dir
|
||||
sudo rm -rf /var/tmp/mem.sh
|
||||
. ./$test
|
||||
errcode=$?
|
||||
endsuite
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ if [ $BE -ne 0 ]; then
|
|||
stop_backend -f $cfg
|
||||
fi
|
||||
|
||||
endtest
|
||||
|
||||
rm -rf $dir
|
||||
|
||||
new "endtest"
|
||||
endtest
|
||||
|
|
|
|||
|
|
@ -296,41 +296,6 @@ check_db running ${subfilename}
|
|||
new "cli show config"
|
||||
expectpart "$($clixon_cli -1 -f $cfg show config xml -- -m clixon-mount1 -M urn:example:mount1)" 0 "<top xmlns=\"urn:example:clixon\"><mylist><name>x</name><root><mount1 xmlns=\"urn:example:mount1\"><mylist1><name1>x1</name1></mylist1></mount1><extra xmlns=\"urn:example:mount1\"><extraval>foo</extraval></extra></root></mylist></top>"
|
||||
|
||||
s0=$($stat -c "%Y" $dir/running.d/${subfilename})
|
||||
new "Change mount data"
|
||||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><top xmlns=\"urn:example:clixon\"><mylist><name>x</name><root><mount1 xmlns=\"urn:example:mount1\"><mylist1><name1>x1</name1><value1>foo</value1></mylist1></mount1></root></mylist></top></config></edit-config></rpc>" "" "<rpc-reply $DEFAULTNS><ok/></rpc-reply>"
|
||||
|
||||
sleep 1
|
||||
|
||||
new "netconf commit 3"
|
||||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><commit/></rpc>" "" "<rpc-reply $DEFAULTNS><ok/></rpc-reply>"
|
||||
|
||||
new "Check running subfile changed"
|
||||
s1=$($stat -c "%Y" $dir/running.d/${subfilename})
|
||||
if [ $s0 -eq $s1 ]; then
|
||||
err "Timestamp changed" "$s0 = $s1"
|
||||
fi
|
||||
|
||||
new "Add data to top-level (not mount)"
|
||||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><top xmlns=\"urn:example:clixon\"><mylist><name>y</name></mylist></top></config></edit-config></rpc>" "" "<rpc-reply $DEFAULTNS><ok/></rpc-reply>"
|
||||
|
||||
new "netconf commit 4"
|
||||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><commit/></rpc>" "" "<rpc-reply $DEFAULTNS><ok/></rpc-reply>"
|
||||
|
||||
sleep 1
|
||||
|
||||
new "Check running subfile not changed"
|
||||
s2=$($stat -c "%Y" $dir/running.d/${subfilename})
|
||||
if [ $s1 -ne $s2 ]; then # XXX Sometimes fails
|
||||
err "Timestamp not changed" "$s1 != $s2"
|
||||
fi
|
||||
|
||||
new "Reset secondary adds"
|
||||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><top xmlns=\"urn:example:clixon\"><mylist><name>x</name><root><mount1 xmlns=\"urn:example:mount1\"><mylist1><name1>x1</name1></mylist1></mount1><extra xmlns=\"urn:example:mount1\"><extraval>foo</extraval></extra></root></mylist></top></config><default-operation>replace</default-operation></edit-config></rpc>" "" "<rpc-reply $DEFAULTNS><ok/></rpc-reply>"
|
||||
|
||||
new "netconf commit 5"
|
||||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><commit/></rpc>" "" "<rpc-reply $DEFAULTNS><ok/></rpc-reply>"
|
||||
|
||||
if [ $BE -ne 0 ]; then
|
||||
new "Kill backend"
|
||||
# Check if premature kill
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,9 @@ module clixon-config {
|
|||
JSON not supported.
|
||||
Splits are marked in YANG using extension xl:xmldb-split, (typical usage is
|
||||
mount-points).
|
||||
May not be used together with CLICON_BACKEND_PRIVILEGES=drop and root, since
|
||||
Note that algorithm for not updating unchanged files only applies to edits,
|
||||
commit copies all files regardless.
|
||||
May not work together with CLICON_BACKEND_PRIVILEGES=drop and root, since
|
||||
new files need to be created in XMLDB_DIR";
|
||||
}
|
||||
leaf CLICON_XML_CHANGELOG {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue