mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
Mark test_is_package_manager_busy as requires root
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
3aa6bf65a0
commit
b221e60575
@ -28,6 +28,8 @@ from plinth import cfg
|
|||||||
from plinth.actions import run, superuser_run
|
from plinth.actions import run, superuser_run
|
||||||
from plinth.errors import ActionError
|
from plinth.errors import ActionError
|
||||||
|
|
||||||
|
euid = os.geteuid()
|
||||||
|
|
||||||
|
|
||||||
class TestActions(unittest.TestCase):
|
class TestActions(unittest.TestCase):
|
||||||
"""Verify that privileged actions perform as expected.
|
"""Verify that privileged actions perform as expected.
|
||||||
@ -148,6 +150,7 @@ class TestActions(unittest.TestCase):
|
|||||||
output = output.rstrip('\n')
|
output = output.rstrip('\n')
|
||||||
self.assertEqual(options, output)
|
self.assertEqual(options, output)
|
||||||
|
|
||||||
|
@unittest.skipUnless(euid == 0, 'Needs to be root')
|
||||||
def test_is_package_manager_busy(self):
|
def test_is_package_manager_busy(self):
|
||||||
"""Test the behavior of `is-package-manager-busy` in both locked and
|
"""Test the behavior of `is-package-manager-busy` in both locked and
|
||||||
unlocked states of the dpkg lock file."""
|
unlocked states of the dpkg lock file."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user