From f1449a2542be5bf3dc7ff68b65c36b589093cb9c Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Fri, 15 Jan 2021 14:21:06 +0100 Subject: [PATCH] test error --- lib/src/clixon_proc.c | 2 +- test/test_restconf.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/clixon_proc.c b/lib/src/clixon_proc.c index b0092bd6..7a4061a0 100644 --- a/lib/src/clixon_proc.c +++ b/lib/src/clixon_proc.c @@ -226,7 +226,7 @@ clixon_proc_background(char **argv, pid_t *pid0) { int retval = -1; - pid_t child; + pid_t child = 0; int i; sigfn_t oldhandler = NULL; sigset_t oset; diff --git a/test/test_restconf.sh b/test/test_restconf.sh index 58854c4a..9688007c 100755 --- a/test/test_restconf.sh +++ b/test/test_restconf.sh @@ -266,7 +266,7 @@ testrun() # See test_json.sh new "restconf empty list" - expectpart "$(curl $CURLOPTS -X POST -H "Accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -d '{"clixon-example:route":{"ipv4":[]}}' $proto://$addr/restconf/data)" 0 'HTTP/1.1 201 Created' "Location: $proto://$addr/restconf/data/clixon-example:route" + expectpart "$(curl $CURLOPTS -X POST -H "Accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -d '{"clixon-example:table":{"parameter":[]}}' $proto://$addr/restconf/data)" 0 'HTTP/1.1 201 Created' "Location: $proto://$addr/restconf/data/clixon-example:table" new "restconf Re-add subtree eth/0/0 which should give error" expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+json" -d '{"ietf-interfaces:interfaces":{"interface":{"name":"eth/0/0","type":"clixon-example:eth","enabled":true}}}' $proto://$addr/restconf/data)" 0 '{"ietf-restconf:errors":{"error":{"error-type":"application","error-tag":"data-exists","error-severity":"error","error-message":"Data already exists; cannot create new resource"}}}'