Removed not needed workaround for check-updates on dom0

And fixed test referring to it.
This commit is contained in:
Marta Marczykowska-Górecka 2019-10-16 22:00:11 +02:00
parent 3d7d99081c
commit 74eba3bb7f
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B
2 changed files with 2 additions and 9 deletions

View File

@ -20,8 +20,6 @@
# #
# #
import os
import os.path
import subprocess import subprocess
from PyQt5 import QtWidgets # pylint: disable=import-error from PyQt5 import QtWidgets # pylint: disable=import-error
@ -245,15 +243,11 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings,
qmemman_config_file.close() qmemman_config_file.close()
def __init_updates__(self): def __init_updates__(self):
# TODO: remove workaround when it is no longer needed
self.dom0_updates_file_path = '/var/lib/qubes/updates/disable-updates'
try: try:
self.updates_dom0_val = bool(self.qvm_collection.domains[ self.updates_dom0_val = bool(self.qvm_collection.domains[
'dom0'].features['service.qubes-update-check']) 'dom0'].features['service.qubes-update-check'])
except KeyError: except KeyError:
self.updates_dom0_val =\ self.updates_dom0_val = True
not os.path.isfile(self.dom0_updates_file_path)
self.updates_dom0.setChecked(self.updates_dom0_val) self.updates_dom0.setChecked(self.updates_dom0_val)

View File

@ -128,8 +128,7 @@ class GlobalSettingsTest(unittest.TestCase):
dom0_updates = self.qapp.domains[ dom0_updates = self.qapp.domains[
'dom0'].features['service.qubes-update-check'] 'dom0'].features['service.qubes-update-check']
except KeyError: except KeyError:
self.skipTest("check_updates_dom0 property not implemented") dom0_updates = True
return
self.assertEqual(bool(dom0_updates), self.assertEqual(bool(dom0_updates),
self.dialog.updates_dom0.isChecked(), self.dialog.updates_dom0.isChecked(),