mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
fixes saltstack/salt#64420 'unable to unmount' failure should return False result
This commit is contained in:
parent
41d9f33c3f
commit
d988dfb5b2
3 changed files with 4 additions and 3 deletions
1
changelog/64420.fixed.md
Normal file
1
changelog/64420.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Fix 'unable to unmount' failure to return False result instead of None
|
|
@ -626,7 +626,7 @@ def mounted(
|
|||
active = __salt__["mount.active"](extended=True)
|
||||
if comp_real_name in active:
|
||||
ret["comment"] = "Unable to unmount"
|
||||
ret["result"] = None
|
||||
ret["result"] = False
|
||||
return ret
|
||||
update_mount_cache = True
|
||||
else:
|
||||
|
|
|
@ -94,7 +94,7 @@ def test_mounted():
|
|||
ret.update(
|
||||
{
|
||||
"comment": comt,
|
||||
"result": None,
|
||||
"result": False,
|
||||
"changes": {"umount": umount1},
|
||||
}
|
||||
)
|
||||
|
@ -115,7 +115,7 @@ def test_mounted():
|
|||
"os.path.exists", MagicMock(return_value=False)
|
||||
):
|
||||
comt = "{} does not exist and would not be created".format(name)
|
||||
ret.update({"comment": comt, "changes": {}})
|
||||
ret.update({"comment": comt, "changes": {}, "result": None})
|
||||
assert mount.mounted(name, device, fstype) == ret
|
||||
|
||||
with patch.dict(mount.__opts__, {"test": False}):
|
||||
|
|
Loading…
Add table
Reference in a new issue