Commit Graph

12 Commits

Author SHA1 Message Date
6f61e5b26c fix: Fix functional tests infrastructure and enable connect/ping tests
Fix multiple issues preventing functional tests from running:

Stabber submodule:
- Fix XMPP stream parsing for multiple stanzas per TCP packet
- Add virtual wrapper element for Expat to handle multiple roots
- Support non-<query/> IQ payloads (ping, blocklist, etc.)
- Relax stanza matching to allow extra attributes in received

Profanity changes:
- cmd_defs.c: Increase /connect args limit from 7 to 9
- proftest.c: Add startup delay, use legacy auth, debug logging
- test_ping.c: Use wildcard IDs, regex matching, timing fixes
- functionaltests.c: Enable connect and ping test suites

Results: 9/10 tests passing

TODO:
- [ ] Fix ping_server test (disco#info response handling)
- [ ] Uncomment and fix remaining test suites (rooms, message,
      receipts, chat_session, presence, etc.)
- [ ] Remove STBBR_LOGDEBUG after stabilization
- [ ] Review timing/sleep() calls for optimization
2025-12-02 18:22:23 +03:00
1305c59b5e refactor(tests): migrate functional tests to content-based stubbing and enable unconditionally 2025-11-26 18:26:02 +03:00
Steffen Jaeckel
988d3663d1 Introduce tests/prof_cmocka.h
As 9f2abc75 accidentally got the ordering of some of the includes wrong,
I decided to propose my initial solution again.

Additional to that, I've opened a MR against CMocka to solve this on
their side, since I believe that the current way this is done is not
sustainable [0].

[0] https://gitlab.com/cmocka/cmocka/-/merge_requests/91

Fixes: 9f2abc75 ("Fix tests with gcc15 (uintptr_t)")
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>

CProof note: our new tests need to also be updated.
2025-09-10 14:11:03 +02:00
Michael Vetter
a28f0d9e74 Update tests with new URL
https://github.com/profanity-im/profanity/issues/1085
2019-05-03 10:46:41 +02:00
James Booth
f189dbc687 Only send ping requests to client that support it 2017-06-16 00:59:21 +01:00
James Booth
970ab94ed3 Change server name in functional tests 2017-06-15 23:30:39 +01:00
James Booth
6511d61b13 Show message when server does not support ping 2017-06-15 23:27:30 +01:00
James Booth
b8c94376aa Add /blocked command 2016-05-01 19:39:39 +01:00
James Booth
167553ae8f Fixed functional test ID based stubs 2016-04-26 23:50:55 +02:00
James Booth
7f98e013e1 Use single quotes in functional test stanzas 2015-12-30 00:12:24 +00:00
James Booth
a48b9fcec2 Tidied functional tests 2015-06-13 19:41:11 +01:00
James Booth
68ed20f10d Moved all tests to tests folder 2015-06-12 23:53:30 +01:00