5 Commits
Author SHA1 Message Date
Stefan-Sanger 35161b9b6d fix: resolve 3 in-container test failures in CI compose run
1. REST 404 "Unknown host: prosody": the tester reaches prosody by
   service name (http://prosody:5280), so aiohttp sends Host: prosody,
   which Prosody rejects as an unknown vhost. The auto host-header
   heuristic only overrides for IP/localhost. Set REST_HOST_HEADER=
   example.com explicitly in the tester env so HTTP routing lands on the
   example.com VirtualHost that serves mod_http_rest /rest.

2. healthcheck.sh not found: the static test_04_infra checks resolve
   ../config/healthcheck.sh (= /config/healthcheck.sh) but the tester
   image only ships /tests. Mount ./config:/config:ro so the path
   resolves inside the container.

3. telnet non-loopback banner: read only 256 bytes, capturing just the
   ASCII-art top and never the literal "Prosody" text. Bump to 1024 to
   match test_04_infra.test_telnet_banner, which passes with the larger
   read.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:12 +02:00
Stefan-Sanger 51504f8a6f fix: correct pytest paths for tester container
The tester container uses WORKDIR /tests, so 'tests/pytest.ini' resolves
to /tests/tests/pytest.ini which does not exist, causing FileNotFoundError
in CI. Use paths relative to /tests (pytest . -c pytest.ini) for all
in-container invocations: CI job, Makefile target, tester image CMD, and
docs. Host-run scripts are unchanged (they run from repo root).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:12 +02:00
Stefan-Sanger d51c68c0b4 feat: add C2S/S2S_STANZA_SIZE_LIMIT env vars (default 5MB)
Add c2s_stanza_size_limit and s2s_stanza_size_limit to the config
template, backed by C2S_STANZA_SIZE_LIMIT and S2S_STANZA_SIZE_LIMIT
env vars. Both default to 5242880 (5MB) when unset, set in startup.sh.
The compose harness sets them explicitly.

Prosody 13.0.6 defaults are 256KB (c2s) and 512KB (s2s), which are too
small for large file-transfer invitations and Jitsi meet sessions.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 43a9d7ec57 feat: add run-compose-tests.sh — one-command compose harness testsuite
Brings up the docker-compose stack (postgres + mocks + prosody), waits
for prosody to become healthy, and runs the full pytest suite with all
env vars set so tests that need MOCK_URL, PG, BOSH/WS, telnet, etc. are
not skipped.

Auto-detects if port 5582 is already in use (e.g. kubectl port-forward)
and remaps the telnet host port to 5583 via the TELNET_HOST_PORT env var
in docker-compose.yml.

Usage:
  ./run-compose-tests.sh              # up + test + down
  ./run-compose-tests.sh --no-down    # leave stack running
  ./run-compose-tests.sh --down       # just tear down

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 2b798bf583 test(harness): add docker-compose stack, mocks, and extend suite per test-improvement plan
Implements all phases of test-improvement.md:

- docker-compose.yml: postgres + aiohttp mocks + prosody + optional tester,
  using exact template placeholder names (fixes latent fcm_api_url/del_api_url
  envsubst bug).
- tests/mocks: single aiohttp backend (auth, FCM, delfile, avatar, file-share)
  with /__requests capture API and /__fcm_error for prune tests.
- tests/Dockerfile + tests/requirements.txt: tester image.
- conftest: mock_client fixture, --mock-url; VNCXmppClient now honors
  XMPP_HOST/PORT (slixmpp was SRV-resolving the JID domain); RESTInjector
  sends Host: <domain> (prosody routes HTTP by Host header).
- test_08_image_patches: docker-exec grep of every patched upstream file.
- test_09_http_sideeffects: FCM (1:1 + MUC), delfile, vcard-avatar, receipts.
- test_10_smacks: enable/ack, resume-replay, hibernation-expiry (offline
  variant xfail until fork is replaced by upstream mod_smacks_offline).
- test_11_smokes: filter_chatstates, idlecompat, http_altconnect, webpresence,
  admin-telnet non-loopback.
- test_12_image_runtime: http_upload slot handshake, healthcheck exit-2,
  no-residual-placeholder config check.
- test_06_postgres: real kick-row assertion via unregister IQ.
- test_02_muc: vcard_muc get/set; test_03_vnctalk: muc_hook non-joined affiliate.
- startup.sh + template: SMACKS_HIBERNATION_TIME as a proper global config var
  (default 300) so SMACKS expiry tests can lower it.
- Makefile (make up/test/down/logs) and run-tests.sh updated.

Validated end-to-end against the compose stack: 81 passed, 1 xfailed,
1 pre-existing vcard_fallback failure (unrelated), 3 skipped.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00