1
0
Fork 0
forked from mirror/prosody
prosody/tests
Sara Aimée Smiseth 81e9c1abd9
Add LDAP authentication support to Prosody ()
This commit adds support for LDAP authentication.

The Dockerfile has been modified to install the required Lua modules (lua-ldap) and the prosody.cfg.lua file has been modified to add environment variables for configuring the LDAP connection. These environment variables include LDAP_BASE, LDAP_SERVER, LDAP_ROOTDN, LDAP_PASSWORD, LDAP_FILTER, LDAP_SCOPE, LDAP_TLS, LDAP_MODE, and LDAP_ADMIN_FILTER.

The authentication variable has also been updated to use the value of the AUTHENTICATION environment variable, which defaults to "internal_hashed" if not set. This allows users to configure Prosody to use LDAP for authentication instead of the default internal hashing method.

* Update test dependencies: aioxmpp, pytest-asyncio + add pytz to requirements.txt

This fixes the following error when running the tests:
E   ModuleNotFoundError: No module named 'pytz'

Instead of pytz only pytz-deprecation-shim was installed.

TODO Check if "pytz" can be removed from requirements.txt later on.
2023-03-25 11:23:51 +01:00
..
bats Update bats-assert + bats-core + bats-support () 2022-05-18 16:50:37 +02:00
docker-compose.yml Update prosody to version 0.12.0 () 2022-05-05 18:25:19 +02:00
readme.md Prepare for version v1.1.3 2020-10-30 17:53:00 +01:00
requirements.txt Add LDAP authentication support to Prosody () 2023-03-25 11:23:51 +01:00
test.bash Update prosody and luarocks () 2023-02-23 16:22:36 +01:00
test_prosody.py Create tests () 2020-10-30 17:47:05 +01:00
tests-prosody.bats Add support for postgres, mariadb/mysql databases () 2021-05-07 14:06:29 +02:00
tests-prosody_postgres.bats Add support for postgres, mariadb/mysql databases () 2021-05-07 14:06:29 +02:00
tests.bats Update prosody to version 0.12.0 () 2022-05-05 18:25:19 +02:00

Tests

Pytest is used to login and send messages to other accounts. Bats is used to check the log for debug messages.

Dependencies

  • docker
  • docker-compose
  • python 3

Run tests

Execute test.bash.

Upgrade python packages

The following will install the newest version of packages in requirements.txt.

cat requirements.txt | sed 's/==.*//g' | xargs pip install -U

If updates are available --> update and create new version with:

pip-chill > requirements.txt