Commit Graph

468 Commits

Author SHA1 Message Date
Badlop 956c0488c9 Update a few more copyright year 2026-01-20 12:16:19 +01:00
Badlop a315046af8 Result of running "make format" 2026-01-19 18:31:52 +01:00
Stefan Strigler 480c6e0995 add support for 'great invitations' as mod_invites 2026-01-19 17:03:42 +01:00
Badlop 6d74bef73b commands_tests: Better check for the disco item node instead of name 2026-01-12 18:21:02 +01:00
Metalhearf 5f94b5252b Update copyright year to 2026 2026-01-05 12:22:57 +01:00
Badlop 51081276c2 Remove OTP_BELOW_24 2025-11-13 18:24:13 +01:00
Badlop 26875762b5 Remove USE_OLD_CRYPTO_HMAC 2025-11-13 18:24:07 +01:00
Badlop ae36405466 CI and Runtime: Reorganize steps to run in parallel, and ARM runner 2025-10-09 13:54:10 +02:00
Badlop 10a82afd46 Tests: Run agnostic-database tests only once, not for every backend 2025-10-09 13:54:06 +02:00
Badlop bba9563525 Tests: The odbc backend is not actually used in Commont Tests 2025-10-09 13:54:04 +02:00
Badlop 558cabd860 Tests: Fix typo when commenting CT_BACKENDS environment variable 2025-10-09 13:54:02 +02:00
Badlop 5575d4e78e Rename New SQL schema to Multihost, and Default to Singlehost
Right now all names are supported, the previous (obsolete)
and the renamed (preferred). The changes relevant to the usage are:

When preparing configuration, the arguments:
  ./configure --enable-new-sql-schema
  ./configure --enable-multihost-sql-schema

When configuring ejabberd, the toplevel options:
  new_sql_schema: true
  sql_schema_multihost: true

When developing source code, the functions:
  ejabberd_sql:use_new_schema()
  ejabberd_sql:use_multihost_schema()
2025-09-17 11:12:38 +02:00
Holger Weiss 644d468b4f Update registration test
Adjust test case for commit 654d4b81b1.
2025-08-21 09:51:24 +02:00
Badlop 5e93725044 Replace options rtbl_host and rtbl_domains_node with rtbl_services 2025-07-07 17:42:05 +02:00
Badlop d00561b58c Move filtering implementation to a submodule 2025-06-18 11:52:28 +02:00
Badlop f3b1b5d419 Result of running "make format" 2025-06-18 11:52:28 +02:00
Stefan Strigler d9a7b67f0e mod_antispam: increase timeout when waiting for dump file 2025-06-17 17:21:58 +02:00
Stefan Strigler bae345b92b mod_antispam: test dump file 2025-06-17 13:18:13 +02:00
Stefan Strigler 10ec128b94 mod_antispam: test whitelisted domain 2025-06-17 13:18:13 +02:00
Stefan Strigler 7a6e409879 mod_antispam: use message/3 in test 2025-06-17 13:18:13 +02:00
Stefan Strigler ea19e4bc7f mod_antispam: remove unnecessary check in test
this was left over from debugging issues with fixtures
2025-06-17 13:18:13 +02:00
Badlop b607d95a93 Refactorize each individual test case in individual functions 2025-06-17 13:18:13 +02:00
Stefan Strigler 34b40aec66 mod_antispam: add format instructions 2025-06-17 13:18:13 +02:00
Stefan Strigler c48aa38c39 mod_antispam: add test suite 2025-06-17 13:10:27 +02:00
Stefan Strigler 70bec7b714 tests: update readme and compose to work with current sw versions 2025-06-17 13:10:27 +02:00
Badlop 38cc3ccb1e Avoid using the "else" conditional compilation macro directive
Even if "-else." is a valid directive:
  https://www.erlang.org/docs/28/system/macros.html#conditional-compilation
there is a bug in rebar3_format that annoyingly rewrites it as "- else ."
  https://github.com/AdRoll/rebar3_format/issues/337
as a quick workaround, rewrite directives to not use "-else."
2025-06-05 17:02:41 +02:00
Paweł Chmielowski bd5f9537c5 Normalize username when determining if user want to change pass in mod_register
Should fix issue #4377
2025-04-29 11:43:17 +02:00
Badlop 82ec0a4837 Remove unused MyNick variables 2025-04-22 12:27:09 +02:00
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