diff --git a/test/test_yang_with_defaults.sh b/test/test_yang_with_defaults.sh index c3bf52de..cae0fa15 100755 --- a/test/test_yang_with_defaults.sh +++ b/test/test_yang_with_defaults.sh @@ -381,18 +381,32 @@ expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+xml' $RCPR 'eth1ok' new "rfc8040 B.3.9. RESTONF with-defaults parameter = trim" -expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+json' $RCPROTO://localhost/restconf/data/example:interfaces/interface=eth1?with-defaults=trim)" \ +expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+json' $RCPROTO://localhost/restconf/data/example:interfaces/interface=eth3?with-defaults=trim)" \ 0 \ "HTTP/$HVER 200" \ "Content-Type: application/yang-data+json" \ "Cache-Control: no-cache" \ -'{"example:interface":\[{"name":"eth1"}\]}' -expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+xml' $RCPROTO://localhost/restconf/data/example:interfaces/interface=eth1?with-defaults=trim)" \ +'{"example:interface":\[{"name":"eth3","status":"waking up"}\]}' +expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+xml' $RCPROTO://localhost/restconf/data/example:interfaces/interface=eth3?with-defaults=trim)" \ 0 \ "HTTP/$HVER 200" \ "Content-Type: application/yang-data+xml" \ "Cache-Control: no-cache" \ -'eth1' +'eth3waking up' + +new "rfc8040 B.3.9. RESTCONF with-defaults parameter = report-all-tagged" +expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+json' $RCPROTO://localhost/restconf/data/example:interfaces/interface=eth1?with-defaults=report-all-tagged)" \ +0 \ +"HTTP/$HVER 200" \ +"Content-Type: application/yang-data+json" \ +"Cache-Control: no-cache" \ +'{"example:interface":\[{"name":"eth1","mtu":1500,"status":"ok"}\]}' +expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+xml' $RCPROTO://localhost/restconf/data/example:interfaces/interface=eth1?with-defaults=report-all-tagged)" \ +0 \ +"HTTP/$HVER 200" \ +"Content-Type: application/yang-data+xml" \ +"Cache-Control: no-cache" \ +'eth11500ok' if [ $RC -ne 0 ]; then