fix(sftp): nach erfolgreichem Test als erreichbar anzeigen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Florian Wilde
2026-10-10 22:54:46 +02:00
co-authored by Claude Opus 5.5
parent 0a317e2aa9
commit 4369faf144
3 changed files with 9 additions and 0 deletions
+2
View File
@@ -9,6 +9,8 @@ Die Version steht an genau einer Stelle: `src/netmover/__init__.py`.
## [Unreleased]
### Geändert
- SFTP-Anbindungen gelten nach erfolgreichem Test als „erreichbar“ (vorher bis
zum ersten Regellauf „nicht geprüft“).
- Klartext-Hinweis bei `mount error(95)` (keine gemeinsame SMB-Version) mit
Synology-Einstellung; aufgefallen bei der Anbindung des echten NAS.
+5
View File
@@ -507,6 +507,11 @@ class MountManager:
if cfg.type is MountType.SFTP and m.host_key is None and report.can_read:
m.host_key = report.host_key
event(log, "sftp.host_key_pinned", mount=m.name, fp=report.host_key_fingerprint)
# SFTP hat keinen Mount-Zustand – ein erfolgreicher Test heißt „erreichbar“.
if cfg.type is MountType.SFTP and report.ok and m.state is not MountState.MOUNTED:
m.state = MountState.MOUNTED
m.state_since = utcnow()
m.last_error = None
# -- Lebenszeichen und Wiederherstellung --------------------------------------
+2
View File
@@ -147,6 +147,8 @@ def test_manager_pins_host_key_and_checks_alive(
with session_factory() as s:
mm = s.get(Mount, mid)
assert mm is not None and mm.host_key == server.host_key_string
# Praxisbefund: nach erfolgreichem Test „erreichbar“ statt „nicht geprüft“
assert mm.state is MountState.MOUNTED
assert manager.check_alive(mid) is None
with session_factory() as s: