Skip to content

Commit 10dde28

Browse files
committed
fix: craft-providers CI doesn't have lxd, mock it out
1 parent 64c9739 commit 10dde28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/unit/test_hookutil.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_no_projects():
3232
"""Make sure HookError is raised if there is no corresponding lxc project."""
3333
# Use our own mock HookHelper rather than the fixture, we need to do things a little
3434
# differently here
35+
HookHelper._check_has_lxd = MagicMock()
3536
original_lxc_func = HookHelper.lxc
3637

3738
def fake_lxc(self, *args, **kwargs):
@@ -50,6 +51,7 @@ def fake_lxc(self, *args, **kwargs):
5051
def fake_hookhelper():
5152
def fake_hookhelper(instance_list):
5253
HookHelper._check_project_exists = MagicMock() # raise nothing
54+
HookHelper._check_has_lxd = MagicMock()
5355
helper = HookHelper(project_name=PROJECT_NAME, simulate=False, debug=True)
5456

5557
original_lxc_func = helper.lxc

0 commit comments

Comments
 (0)