CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
296 stars 187 forks source link

`test_error` fails on latest `devel` #1408

Closed jktjkt closed 1 year ago

jktjkt commented 1 year ago

With the very latest libyang & sysrepo, I get this:

 1/20 Test #19: test_error .......................Subprocess aborted***Exception:   8.48 sec
[==========] tests: Running 14 test(s).
libyang[1]: Schema node "transport" for parent "/ietf-subscribed-notifications:subscriptions/subscription" not found; in expr "not(../transport" with context node "/ietf-subscribed-notifications:subscriptions/subscription/encoding".
libyang[1]: Schema node "transport" for parent "/ietf-subscribed-notifications:subscriptions/subscription" not found; in expr "not(../transport) or derived-from(../transport" with context node "/ietf-subscribed-notifications:subscriptions/subscription/encoding".
[ RUN      ] test_unique
[       OK ] test_unique
[ RUN      ] test_max_elem
[       OK ] test_max_elem
[ RUN      ] test_min_elem
[       OK ] test_min_elem
[ RUN      ] test_must
[       OK ] test_must
[ RUN      ] test_require_instance
[       OK ] test_require_instance
[ RUN      ] test_mandatory_choice
[       OK ] test_mandatory_choice
[ RUN      ] test_invalid_insert
[       OK ] test_invalid_insert
[ RUN      ] test_create_exists
[       OK ] test_create_exists
[ RUN      ] test_delete_missing
[       OK ] test_delete_missing
[ RUN      ] test_none_missing
[       OK ] test_none_missing
[ RUN      ] test_invalid_xpath_filter
[       OK ] test_invalid_xpath_filter
[ RUN      ] test_bad_element
"<rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <error-type>application</error-type>
  <error-tag>operation-failed</error-tag>
  <error-severity>error</error-severity>
  <error-message xml:lang="en">Invalid non-number-encoded uint32 value "string". (Data location "/errors:num".)</error-message>
</rpc-error>
<rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <error-type>application</error-type>
  <error-tag>operation-failed</error-tag>
  <error-severity>error</error-severity>
  <error-message xml:lang="en">User callback failed.</error-message>
</rpc-error>
" != "<rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <error-type>application</error-type>
  <error-tag>bad-element</error-tag>
  <error-severity>error</error-severity>
  <error-message xml:lang="en">Invalid type uint32 value "string".</error-message>
  <error-info>
    <bad-element>/errors:num</bad-element>
  </error-info>
</rpc-error>
"
[   LINE   ] --- /home/jkt/work/cesnet/gerrit/github/CESNET/Netopeer2/tests/test_error.c:388: error: Failure!
michalvasko commented 1 year ago

I know, I just had to go to lunch. Should work with the latest libyang.