mirror of
https://github.com/deunix-educ/mediadeck.git
synced 2026-11-25 04:39:42 +01:00
Add make test-integration: full server scenario on a private D-Bus bus
Real MediaDeckServer under aiohttp.test_utils, private session bus, isolated XDG dirs and PATH, fake MPRIS player and fake gio/pactl/launcher programs that log their arguments. Covers authentication, player listing and control, audio, media listing and path escapes, shell-free opening of a hostile file name, imported launchers and admin changes pushed to clients. Verified to fail when the hidden-component check, the token check or the metadata enrichment is removed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ PORT ?= 8765
|
||||
HTTP_PORT ?=
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
.PHONY: help deps install config token url qr cert http-on http-off check run dev lint test uinput uinput-remove \
|
||||
.PHONY: help deps install config token url qr cert http-on http-off check run dev lint test test-integration uinput uinput-remove \
|
||||
service-install service-uninstall status logs firewall clean distclean
|
||||
|
||||
help: ## Affiche cette aide
|
||||
@@ -81,6 +81,9 @@ lint: $(PYTHON) ## Vérification de types (pyright)
|
||||
test: $(PYTHON) ## Tests unitaires
|
||||
$(PYTHON) -m unittest discover -s tests -v
|
||||
|
||||
test-integration: $(PYTHON) ## Scénario complet : serveur + bus D-Bus privé + faux lecteur, gio et pactl
|
||||
$(PYTHON) -m unittest discover -s tests -p 'test_integration.py' -v
|
||||
|
||||
uinput: ## Autorise /dev/uinput pour la session active (sudo, règle udev uaccess)
|
||||
sudo install -m 644 udev/60-mediadeck-uinput.rules $(UDEV_RULE)
|
||||
sudo modprobe uinput
|
||||
|
||||
Reference in New Issue
Block a user