diff --git a/supervisor/mounts/mount.py b/supervisor/mounts/mount.py index 05b1c9c51..2e2ae0aec 100644 --- a/supervisor/mounts/mount.py +++ b/supervisor/mounts/mount.py @@ -383,7 +383,7 @@ class CIFSMount(NetworkMount): @property def options(self) -> list[str]: """Options to use to mount.""" - options = super().options + options = super().options + ["noserverino"] if self.version: options.append(f"vers={self.version}") diff --git a/tests/mounts/test_manager.py b/tests/mounts/test_manager.py index 23f68faee..9341a2612 100644 --- a/tests/mounts/test_manager.py +++ b/tests/mounts/test_manager.py @@ -116,7 +116,7 @@ async def test_load( "mnt-data-supervisor-mounts-backup_test.mount", "fail", [ - ["Options", Variant("s", "guest")], + ["Options", Variant("s", "noserverino,guest")], ["Type", Variant("s", "cifs")], ["Description", Variant("s", "Supervisor cifs mount: backup_test")], ["What", Variant("s", "//backup.local/backups")], diff --git a/tests/mounts/test_mount.py b/tests/mounts/test_mount.py index e551a0290..093fef944 100644 --- a/tests/mounts/test_mount.py +++ b/tests/mounts/test_mount.py @@ -77,7 +77,7 @@ async def test_cifs_mount( assert mount.what == "//test.local/camera" assert mount.where == Path("/mnt/data/supervisor/mounts/test") assert mount.local_where == tmp_supervisor_data / "mounts" / "test" - assert mount.options == expected_options + [ + assert mount.options == ["noserverino"] + expected_options + [ f"username={mount_data['username']}", f"password={mount_data['password']}", ] @@ -104,7 +104,8 @@ async def test_cifs_mount( Variant( "s", ",".join( - expected_options + ["noserverino"] + + expected_options + [ f"username={mount_data['username']}", f"password={mount_data['password']}", @@ -215,7 +216,7 @@ async def test_load( "mnt-data-supervisor-mounts-test.mount", "fail", [ - ["Options", Variant("s", "guest")], + ["Options", Variant("s", "noserverino,guest")], ["Type", Variant("s", "cifs")], ["Description", Variant("s", "Supervisor cifs mount: test")], ["What", Variant("s", "//test.local/share")],