Make backend tests use a writable runtime state path #55

Closed
opened 2026-05-23 00:34:57 +02:00 by parkel · 0 comments
Owner

The local .venv backend test run currently fails outside Docker because test_filesystem_ssh_credential_uses_existing_key_path tries to materialize SSH credentials under /opt/pobsync/state/ssh-credentials/.... In this development environment /opt/pobsync is read-only, so the otherwise unrelated full backend test suite fails with OSError: [Errno 30] Read-only file system.

Goal:

  • Make tests override POBSYNC_HOME or the credential materialization path to a temporary writable directory.
  • Keep production defaults unchanged.
  • Ensure python manage.py test pobsync_backend -v 2 works from a local virtualenv without Docker-specific writable paths.

Context:

  • Targeted issue #54 tests pass locally.
  • Full backend run: 209/210 pass, one test errors on /opt/pobsync write access.
The local `.venv` backend test run currently fails outside Docker because `test_filesystem_ssh_credential_uses_existing_key_path` tries to materialize SSH credentials under `/opt/pobsync/state/ssh-credentials/...`. In this development environment `/opt/pobsync` is read-only, so the otherwise unrelated full backend test suite fails with `OSError: [Errno 30] Read-only file system`. Goal: - Make tests override `POBSYNC_HOME` or the credential materialization path to a temporary writable directory. - Keep production defaults unchanged. - Ensure `python manage.py test pobsync_backend -v 2` works from a local virtualenv without Docker-specific writable paths. Context: - Targeted issue #54 tests pass locally. - Full backend run: 209/210 pass, one test errors on `/opt/pobsync` write access.
parkel added this to the 1.2 milestone 2026-05-23 00:34:57 +02:00
parkel referenced this issue from a commit 2026-05-23 01:07:11 +02:00
Sign in to join this conversation.