## 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:
@@ -133,6 +133,7 @@ class DjangoConfigSourceTests(TestCase):
|
|||||||
)
|
)
|
||||||
HostConfig.objects.create(host="web-01", address="web-01.example.test")
|
HostConfig.objects.create(host="web-01", address="web-01.example.test")
|
||||||
|
|
||||||
|
with override_settings(POBSYNC_HOME=str(Path(tmp) / "home")):
|
||||||
cfg = DjangoConfigSource().effective_config_for_host("web-01")
|
cfg = DjangoConfigSource().effective_config_for_host("web-01")
|
||||||
|
|
||||||
self.assertIn(f"-oIdentityFile={identity_file}", cfg["ssh"]["options"])
|
self.assertIn(f"-oIdentityFile={identity_file}", cfg["ssh"]["options"])
|
||||||
|
|||||||
Reference in New Issue
Block a user