## Summary

- Override `POBSYNC_HOME` in the filesystem SSH credential test.
- Keep credential materialization tests self-contained and writable in local development.
- Leave production runtime defaults unchanged.

## Tests
- `.venv/bin/python manage.py test src.pobsync_backend.tests.test_django_config_source --verbosity 2`
- `.venv/bin/python manage.py test src.pobsync_backend --verbosity 2`

Closes #55
This commit is contained in:
2026-05-23 01:06:22 +02:00
parent b87203c538
commit a6d6468da8

View File

@@ -133,7 +133,8 @@ class DjangoConfigSourceTests(TestCase):
)
HostConfig.objects.create(host="web-01", address="web-01.example.test")
cfg = DjangoConfigSource().effective_config_for_host("web-01")
with override_settings(POBSYNC_HOME=str(Path(tmp) / "home")):
cfg = DjangoConfigSource().effective_config_for_host("web-01")
self.assertIn(f"-oIdentityFile={identity_file}", cfg["ssh"]["options"])
self.assertEqual(cfg["ssh_credential"]["storage"], "filesystem")