test(disco): add comprehensive XEP-0030 functional tests
Some checks failed
CI Code / Check spelling (pull_request) Successful in 19s
CI Code / Check coding style (pull_request) Successful in 30s
CI Code / Code Coverage (pull_request) Failing after 5m12s
CI Code / Linux (debian) (pull_request) Failing after 7m5s
CI Code / Linux (ubuntu) (pull_request) Failing after 7m12s
CI Code / Linux (arch) (pull_request) Failing after 7m22s

Add 7 new tests for /disco command:
- disco_items_to_jid: query items to specific JID
- disco_info_empty_result: handle empty disco#info response
- disco_info_multiple_identities: multiple identity elements
- disco_info_without_name: identity without optional name attr
- disco_items_without_name: items without optional name attr
- disco_info_service_unavailable: error handling for info
- disco_items_error_handling: error handling for items (XEP-0030 §7)

The disco_items_error_handling test documents a bug where disco#items
errors are silently ignored (unlike disco#info which handles them).
This violates XEP-0030 Section 7 which requires error feedback to user.
This commit is contained in:
2026-02-11 15:19:58 +03:00
parent a08e57743f
commit 3fc19112c9
3 changed files with 209 additions and 0 deletions

View File

@@ -187,6 +187,13 @@ main(int argc, char* argv[])
PROF_FUNC_TEST(disco_items_shows_items),
PROF_FUNC_TEST(disco_items_empty_result),
PROF_FUNC_TEST(disco_requires_connection),
PROF_FUNC_TEST(disco_items_to_jid),
PROF_FUNC_TEST(disco_info_empty_result),
PROF_FUNC_TEST(disco_info_multiple_identities),
PROF_FUNC_TEST(disco_info_without_name),
PROF_FUNC_TEST(disco_items_without_name),
PROF_FUNC_TEST(disco_info_service_unavailable),
PROF_FUNC_TEST(disco_items_error_handling),
};
/* ============================================================