mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-14 20:56:30 +00:00
Use noserverino option in cifs mounts (#4398)
This commit is contained in:
parent
35bd66119a
commit
d3031e2eae
@ -383,7 +383,7 @@ class CIFSMount(NetworkMount):
|
|||||||
@property
|
@property
|
||||||
def options(self) -> list[str]:
|
def options(self) -> list[str]:
|
||||||
"""Options to use to mount."""
|
"""Options to use to mount."""
|
||||||
options = super().options
|
options = super().options + ["noserverino"]
|
||||||
if self.version:
|
if self.version:
|
||||||
options.append(f"vers={self.version}")
|
options.append(f"vers={self.version}")
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ async def test_load(
|
|||||||
"mnt-data-supervisor-mounts-backup_test.mount",
|
"mnt-data-supervisor-mounts-backup_test.mount",
|
||||||
"fail",
|
"fail",
|
||||||
[
|
[
|
||||||
["Options", Variant("s", "guest")],
|
["Options", Variant("s", "noserverino,guest")],
|
||||||
["Type", Variant("s", "cifs")],
|
["Type", Variant("s", "cifs")],
|
||||||
["Description", Variant("s", "Supervisor cifs mount: backup_test")],
|
["Description", Variant("s", "Supervisor cifs mount: backup_test")],
|
||||||
["What", Variant("s", "//backup.local/backups")],
|
["What", Variant("s", "//backup.local/backups")],
|
||||||
|
@ -77,7 +77,7 @@ async def test_cifs_mount(
|
|||||||
assert mount.what == "//test.local/camera"
|
assert mount.what == "//test.local/camera"
|
||||||
assert mount.where == Path("/mnt/data/supervisor/mounts/test")
|
assert mount.where == Path("/mnt/data/supervisor/mounts/test")
|
||||||
assert mount.local_where == tmp_supervisor_data / "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"username={mount_data['username']}",
|
||||||
f"password={mount_data['password']}",
|
f"password={mount_data['password']}",
|
||||||
]
|
]
|
||||||
@ -104,7 +104,8 @@ async def test_cifs_mount(
|
|||||||
Variant(
|
Variant(
|
||||||
"s",
|
"s",
|
||||||
",".join(
|
",".join(
|
||||||
expected_options
|
["noserverino"]
|
||||||
|
+ expected_options
|
||||||
+ [
|
+ [
|
||||||
f"username={mount_data['username']}",
|
f"username={mount_data['username']}",
|
||||||
f"password={mount_data['password']}",
|
f"password={mount_data['password']}",
|
||||||
@ -215,7 +216,7 @@ async def test_load(
|
|||||||
"mnt-data-supervisor-mounts-test.mount",
|
"mnt-data-supervisor-mounts-test.mount",
|
||||||
"fail",
|
"fail",
|
||||||
[
|
[
|
||||||
["Options", Variant("s", "guest")],
|
["Options", Variant("s", "noserverino,guest")],
|
||||||
["Type", Variant("s", "cifs")],
|
["Type", Variant("s", "cifs")],
|
||||||
["Description", Variant("s", "Supervisor cifs mount: test")],
|
["Description", Variant("s", "Supervisor cifs mount: test")],
|
||||||
["What", Variant("s", "//test.local/share")],
|
["What", Variant("s", "//test.local/share")],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user