1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-05 19:42:11 +02:00
Commit graph

440 commits

Author SHA1 Message Date
Paweł Chmielowski
602a42f5ce Add tests for duplicate occupant-id handling 2025-04-16 11:39:30 +02:00
Paweł Chmielowski
7862c6a7db Add support for storing multiple passwords formats per user
This adds option 'auth_stored_password_types' that can be used to setup
storage of multiple passwords for each user. When this is set, on each
password set, database will now store password in each format specified.
2025-03-26 11:03:39 +01:00
badlop
418ca34c85
Merge pull request #4357 from badlop/adhoc_api
New mod_adhoc_api and related improvements
2025-03-20 11:10:43 +01:00
Paweł Chmielowski
6d8e588b78 Allows test to be run using ct_run 2025-03-19 10:40:49 +01:00
Badlop
496daf9220 mod_adhoc_api: New module to execute API Commands using Ad-Hoc Commands 2025-03-19 10:39:53 +01:00
Badlop
6d77ace5c9 mod_http_api: Sort list elements in a command result 2025-03-19 10:38:10 +01:00
Badlop
888c335c2e Add tests for config features define_macro and define_keyword 2025-03-18 13:40:21 +01:00
Badlop
ad8e325139 Disable commands tests for old Erlang/OTP versions
Since recently, this test fails with Erlang/OTP 22 and lower:
  =result        failed:
    {test_case_failed,
     "Received input:
      [{error,{compilation_failed,
         \"/home/runner/.ejabberd-modules/sources/ejabberd-contrib/mod_example/src/mod_example.erl\"}}]
      don't match expected patterns:ok"},
2025-03-18 12:45:25 +01:00
Badlop
d834a9c1c1 Delete ejabberd.cfg which apparently isn't needed anymore 2025-02-06 11:02:17 +01:00
Badlop
f72cfa9a13 Test: Uninstall mod_example when the tests has finished 2025-01-15 20:33:33 +01:00
Badlop
4a363b6e76 Test: Fixes to handle re-running test after update_sql
Enable some modules so ejabberd creates their SQL tables
and later those tables can be updated without errors by mod_admin_update_sql
when ci.yml calls "make test" to check update_sql.

However, mod_shared_roster should be stopped before running the actual tests,
as it introduces undesired IQ queries

On the other hand, a few SQL tables are global RAM, and cannot be created
in SQL just for a vhost that is not the first one defined.
2025-01-13 16:34:05 +01:00
Badlop
8ebbb45a19 Update copyright year to 2025 (#4139) 2025-01-03 11:49:37 +01:00
Holger Weiss
e967a409d3 stundisco_tests: Fix TURNS credentials syntax 2024-12-18 22:24:53 +01:00
Holger Weiss
3bc66a7054 stundisco_tests: Check correct credentials syntax 2024-12-18 21:17:07 +01:00
Badlop
790cb104cd Change arguments and result to consistent names (API v3)
Commands accept as argument: user, host, room, service
and return as result JIDs

Commands that change in API v3:
get_room_affiliations
muc_register_nick
muc_unregister_nick
set_room_affiliation
status_list
status_list_host
subscribe_room
subscribe_room_many
unsubscribe_room
2024-12-17 10:12:48 +01:00
Metalhearf
af97211ecc Update URLs in docs/conf files for consistency. 2024-10-31 17:30:20 +01:00
Badlop
01141e5f69 Relax password complexity in test database
This password is not strong enough in MSSQL 2022, relax this restriction
  https://learn.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver16
  https://learn.microsoft.com/en-us/sql/t-sql/statements/create-login-transact-sql?view=sql-server-ver16#check_policy---on--off-
2024-08-21 10:51:46 +02:00
Badlop
65e16dcac1 make format 2024-07-18 11:11:48 +02:00
Paweł Chmielowski
c013a59d16 Restore args conversion of {"k":"v"} to tuple lists in mod_http_api
Switching to json compatible output did broke this, which caused issues in
for example create_rooms_with_opts command.
2024-07-15 21:58:41 +02:00
Badlop
9a0ff13cc2 mod_register: Send welcome message as 'chat' too (#4246)
Apparently, some clients don't display 'normal' messages to the user.
2024-07-12 15:45:59 +02:00
Badlop
a733ba311c New tests for API commands
Only mod_http_api is tested right now; support to test also
ejabberdctl, ejabberd_xmlrpc and web_admin would be great.

This uses mod_example from ejabberd-contrib

How to run only those tests:
  CT_BACKENDS=no_db rebar3 ct --suite=test/ejabberd_SUITE --group=commands_single
2024-07-04 16:55:14 +02:00
Paweł Chmielowski
8d4c1e3617 One more fix for pg91 in test suite 2024-07-03 13:44:48 +02:00
Paweł Chmielowski
35042ebc6a Make sql query in testsuite compatible with pg9.1 2024-07-03 12:38:48 +02:00
Badlop
992d84c002 Add JSON EUnit testing 2024-06-25 17:05:31 +02:00
Badlop
4819baaa07 Test: Update to the new webadmin pages 2024-06-19 17:59:38 +02:00
Badlop
ec13350b24 Test: Enable update_sql_schema
- Test: Enable update_sql_schema by default
- Update test/README about new option
- enable new_schema in tests
2024-05-24 13:21:19 +02:00
Badlop
1076f8bfc2 Test: Clear tables when ending a group, instead of when starting
Because a group may be started but the tables are not yet created,
as they are created automatically when update_sql_schema is enabled.

This modifies commit e2b79ea
2024-05-24 13:21:18 +02:00
Badlop
696e42b5b4 Use json module when Erlang/OTP 27, jiffy with older ones 2024-05-07 11:28:17 +02:00
Badlop
e973360aa7 Test: Fix some minor compilation warnings
- This QueryID is unnecessary since d3aeed8, due to d6e9e03
- DB variable was added in d32a0ce to detect riak and disable some tests,
  but support for Riak was removed later in 3f7d9e3.
- MyJID was added in 5b863c2 but was never actually used
- recv2 return should be checked
2024-04-19 01:50:42 +02:00
Paweł Chmielowski
8f20dd8425 Test retractons in mam_tests 2024-03-18 12:42:03 +01:00
Badlop
cdaf45f91c Test: Check that the message we get is the welcome message, not other 2024-02-09 14:12:22 +01:00
Badlop
589521bfd8 Update copyright year to 2024 (#4139) 2024-01-22 17:29:13 +01:00
Paweł Chmielowski
d55955f7d8 Clean also urn:xmpp:bookmarks:1 after mod_private tests 2023-09-27 19:38:14 +02:00
Badlop
2bd61abd71 Convert allow_private_message MUC room option to allowpm (#3736) 2023-08-16 12:25:46 +02:00
Badlop
5cd6c524ea Allow XML to be visible in web browser in Common Test page 2023-03-07 13:11:24 +01:00
Badlop
c9143dd3d8 Fix TSQLlint warnings in MSSQL test script 2023-02-21 18:17:25 +01:00
Badlop
dea452bdfd Fix Prospector and Pylint warnings in test extauth.py 2023-02-21 18:14:02 +01:00
Paweł Chmielowski
5ca59807d9 Fix problem with results of mam queries using rsm with max and before
Plus add test case for it.
2023-02-03 11:37:54 +01:00
Stu Tomlinson
0c1cf43519 Fix a long standing bug in new schema migration
... and make the test that uncovered it explicitly fail (there was already a
TODO) instead of passing but with errors logged
2023-01-21 15:42:43 +00:00
Stu Tomlinson
56e974ab80 Add ability to run tests on upgraded DB
To test update_sql operation and functionality of resulting DB:

1. Load original schema to DB
2. Set {update_sql, true} in suite.erl
3. Run tests
2023-01-21 15:42:43 +00:00
Stu Tomlinson
d4ab4d16e8 Use python3 to run extauth.py for tests 2023-01-19 23:36:42 +00:00
Stu Tomlinson
aeed1679d8 Add 'new' schema for MS SQL 2023-01-19 23:36:42 +00:00
Stu Tomlinson
ec6f5c17c8 Correct README for creating test docker MS SQL DB 2023-01-19 14:06:11 +00:00
Badlop
243697e25a Update copyright year to 2023 (#3967) 2023-01-10 13:52:04 +01:00
Badlop
b3211b1f71 Update copyright year to 2022 2022-02-11 09:39:25 +01:00
Kian-Meng Ang
adf0f87e99 Fix typos 2022-01-24 08:02:04 +08:00
Alexey Shchepin
c9c5839da4 Fix roster_tests:get_items 2021-09-21 13:30:52 +03:00
Paweł Chmielowski
4c61ea9091 Update tests after last commit 2021-08-04 17:52:23 +02:00
Badlop
1ee64091b3 Fix extauth.py failure in test suite with Python 3 (#3612) 2021-05-25 18:39:18 +02:00
Badlop
3c248745e5 crypto:hmac is removed in Erlang/OTP 24, use our wrapper 2021-03-04 16:41:27 +01:00