Files
vnctalk-prosody/Makefile
T
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

31 lines
1.1 KiB
Makefile

# Makefile — convenience wrappers for the docker-compose test harness.
#
# make test build + up the stack, run the full suite in the tester container
# make up build + start postgres/mocks/prosody (run pytest from the host)
# make down tear the stack down
# make logs tail prosody logs
#
# Host-run example (after `make up`):
# XMPP_HOST=localhost XMPP_PORT=5222 XMPP_DOMAIN=example.com \
# MUC_DOMAIN=conference.example.com XMPP_JID=user1@example.com XMPP_PASSWORD=pass1 \
# XMPP_JID2=user2@example.com XMPP_PASSWORD2=pass2 \
# REST_URL=http://localhost:5280/rest BOSH_URL=http://localhost:5280/http-bind \
# WS_URL=ws://localhost:5280/xmpp-websocket ADMIN_TELNET_HOST=localhost \
# PG_HOST=localhost PG_PORT=5434 PG_DB=prosody PG_USER=prosody PG_PASSWORD=prosody \
# MOCK_URL=http://localhost:8092 SMACKS_HIBERNATION_TIME=10 \
# pytest tests/ -v -c tests/pytest.ini
.PHONY: test up down logs
up:
docker compose up -d --build postgres mocks prosody
test: up
docker compose run --rm --rm tester pytest . -v -c pytest.ini
down:
docker compose down
logs:
docker compose logs -f prosody