Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: force qubes-vm-update to try updating #602

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[MASTER]
persistent=no
ignore=tests
init-hook="import astroid.bases; astroid.bases.POSSIBLE_PROPERTIES.add('stateless_property')"

[MESSAGES CONTROL]
# abstract-class-little-used: see http://www.logilab.org/ticket/111138
Expand Down
1 change: 1 addition & 0 deletions qubes/tests/integ/vm_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def run_qubes_vm_update_and_assert(self, *, expected_ret_codes, options):
asyncio.create_subprocess_exec(
'qubes-vm-update',
"--targets", self.testvm1.name,
"--force-update",
*options,
stdout=f_log,
stderr=subprocess.STDOUT
Expand Down
3 changes: 1 addition & 2 deletions qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,7 @@ def is_qrexec_running(self, stubdom=False):
:py:obj:`False` otherwise.
:rtype: bool
"""
if self.xid < 0: # pylint: disable=comparison-with-callable
if self.xid < 0:
return False
name = self.name + '-dm' if stubdom else self.name
return os.path.exists('/var/run/qubes/qrexec.%s' % name)
Expand Down Expand Up @@ -2281,7 +2281,6 @@ def start_time(self):
def icon(self):
"""freedesktop icon name, suitable for use in
:py:meth:`PyQt4.QtGui.QIcon.fromTheme`"""
# pylint: disable=comparison-with-callable
raw_icon_name = self.label.name
if self.klass == 'TemplateVM':
return 'templatevm-' + raw_icon_name
Expand Down
18 changes: 18 additions & 0 deletions test-packages/qubesdb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
class QubesDB:
def read(self, key):
return b'testvm'

def write(self, key, value):
pass

def rm(self, key):
pass

def list(self, path):
return ['test']

class Error(Exception):
pass

class DisconnectedError(Error):
pass