| 1 |
# XMPP End-to-End Tests |
| 2 |
|
| 3 |
These tests send real XMPP chat and MUC messages against a local ejabberd container. |
| 4 |
|
| 5 |
## Setup |
| 6 |
|
| 7 |
```bash |
| 8 |
./testing/e2e/xmpp/setup.sh |
| 9 |
``` |
| 10 |
|
| 11 |
That script generates self-signed TLS certificates if needed, starts ejabberd, and prints the environment variables required by the tests. |
| 12 |
|
| 13 |
Ports: |
| 14 |
|
| 15 |
- `5222` STARTTLS (use `skiptlsverify=yes` with the self-signed cert) |
| 16 |
- `5223` implicit TLS |
| 17 |
- `5224` plaintext (`disabletls=yes`; STARTTLS is not advertised) |
| 18 |
|
| 19 |
## Accounts |
| 20 |
|
| 21 |
Static credentials are registered on first container create via `CTL_ON_CREATE`: |
| 22 |
|
| 23 |
- `sender@localhost` / `senderpass` |
| 24 |
- `recipient@localhost` / `recipientpass` |
| 25 |
- Room `[email protected]` |
| 26 |
- Room `[email protected]` with password `roompass` |
| 27 |
|
| 28 |
## Run |
| 29 |
|
| 30 |
```bash |
| 31 |
export SHOUTRRR_XMPP_URL='xmpp://sender:senderpass@localhost:5222/?to=recipient@localhost&skiptlsverify=yes' |
| 32 |
export SHOUTRRR_XMPP_TLS_URL='xmpps://sender:senderpass@localhost:5223/?to=recipient@localhost&skiptlsverify=yes' |
| 33 |
export SHOUTRRR_XMPP_PLAIN_URL='xmpp://sender:senderpass@localhost:5224/?to=recipient@localhost&disabletls=yes' |
| 34 |
export SHOUTRRR_XMPP_MUC_URL='xmpp://sender:senderpass@localhost:5222/[email protected]&skiptlsverify=yes' |
| 35 |
export SHOUTRRR_XMPP_MUC_PASSWORD_URL='xmpp://sender:senderpass@localhost:5222/[email protected]&roompassword=roompass&skiptlsverify=yes' |
| 36 |
go test -v ./testing/e2e/xmpp/ |
| 37 |
``` |
| 38 |
|
| 39 |
Tests skip when the corresponding environment variable is unset. |