Fixed: [Restconf PATCH method request failed on item defined by submodule #306](https://github.com/clicon/clixon/issues/306)

This commit is contained in:
Olof hagsand 2022-02-23 11:20:52 +01:00
parent 97316e0bfa
commit 2291275fae
5 changed files with 14 additions and 9 deletions

View file

@ -252,8 +252,12 @@ expectpart "$(curl $CURLOPTS -X GET $RCPROTO://localhost/restconf/data?content=c
new "restconf edit augment 0"
expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:sub2 -d '{"main:aug0":"foo"}')" 0 "HTTP/$HVER 201"
new "restconf edit augment 1"
expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:main -d '{"main:aug1":"foo"}')" 0 "HTTP/$HVER 201"
# Alternative use PUT
new "restconf PUT augment 1 "
expectpart "$(curl $CURLOPTS -X PUT -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:main/aug1 -d '{"main:aug1":"foo"}')" 0 "HTTP/$HVER 201"
new "restconf PATCH augment 1 "
expectpart "$(curl $CURLOPTS -X PATCH -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:main/aug1 -d '{"main:aug1":"foo"}')" 0 "HTTP/$HVER 204"
new "restconf edit augment 2"
expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:sub2 -d '{"main:aug2":"foo"}')" 0 "HTTP/$HVER 201"