test rpc keyless wrong order
This commit is contained in:
parent
4d5c428b79
commit
2b9f19a19f
3 changed files with 5 additions and 2 deletions
|
|
@ -280,7 +280,7 @@ ctx2number(xp_ctx *xc,
|
||||||
{
|
{
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
double n;
|
double n = NAN;
|
||||||
|
|
||||||
switch (xc->xc_type){
|
switch (xc->xc_type){
|
||||||
case XT_NODESET:
|
case XT_NODESET:
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,8 @@ expectfn "$clixon_cli -1 -f $cfg err x" 255 "Config error: api-path syntax error
|
||||||
new "err x a"
|
new "err x a"
|
||||||
expectfn "$clixon_cli -1 -f $cfg err x a 99" 255 "Config error: api-path syntax error \"/example:x/m1=%s\": rpc malformed-message List key m1 length mismatch : Invalid argument"
|
expectfn "$clixon_cli -1 -f $cfg err x a 99" 255 "Config error: api-path syntax error \"/example:x/m1=%s\": rpc malformed-message List key m1 length mismatch : Invalid argument"
|
||||||
|
|
||||||
|
endtest
|
||||||
|
|
||||||
new "Kill backend"
|
new "Kill backend"
|
||||||
# Check if premature kill
|
# Check if premature kill
|
||||||
pid=$(pgrep -u root -f clixon_backend)
|
pid=$(pgrep -u root -f clixon_backend)
|
||||||
|
|
|
||||||
|
|
@ -165,8 +165,9 @@ expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+jso
|
||||||
|
|
||||||
# test rpc lists with / without keys
|
# test rpc lists with / without keys
|
||||||
LIST='<u0 xmlns="urn:example:clixon"><uk>foo</uk></u0><u0 xmlns="urn:example:clixon"><uk>bar</uk></u0><u0 xmlns="urn:example:clixon"><uk>bar</uk></u0>'
|
LIST='<u0 xmlns="urn:example:clixon"><uk>foo</uk></u0><u0 xmlns="urn:example:clixon"><uk>bar</uk></u0><u0 xmlns="urn:example:clixon"><uk>bar</uk></u0>'
|
||||||
|
# On docker /fcgi the return is bar,foo,bar
|
||||||
new "netconf example rpc input list without key with non-unique entries"
|
new "netconf example rpc input list without key with non-unique entries"
|
||||||
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><example xmlns=\"urn:example:clixon\"><x>mandatory</x>$LIST</example></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><x xmlns=\"urn:example:clixon\">mandatory</x><y xmlns=\"urn:example:clixon\">42</y>$LIST</rpc-reply>]]>]]>$"
|
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><example xmlns=\"urn:example:clixon\"><x>mandatory</x>$LIST</example></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><x xmlns=\"urn:example:clixon\">mandatory</x><y xmlns=\"urn:example:clixon\">42</y>" '<u0 xmlns="urn:example:clixon">' '<uk>foo</uk></u0><u0 xmlns="urn:example:clixon"><uk>bar</uk></u0>' "</rpc-reply>]]>]]>$"
|
||||||
|
|
||||||
LIST='<u1 xmlns="urn:example:clixon"><uk>bar</uk><val>1</val></u1><u1 xmlns="urn:example:clixon"><uk>foo</uk><val>2</val></u1>'
|
LIST='<u1 xmlns="urn:example:clixon"><uk>bar</uk><val>1</val></u1><u1 xmlns="urn:example:clixon"><uk>foo</uk><val>2</val></u1>'
|
||||||
new "netconf example rpc input list with key"
|
new "netconf example rpc input list with key"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue