mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Skip libvirt tests if not running as root
Running salt.states.libvirt.keys() results in an OSError if the pki dir needs to be created.
This commit is contained in:
parent
4a8dbc7f13
commit
72e7416ad2
@ -4,6 +4,7 @@
|
||||
'''
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import skipIf, TestCase
|
||||
@ -33,6 +34,7 @@ class LibvirtTestCase(TestCase):
|
||||
'''
|
||||
# 'keys' function tests: 1
|
||||
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
@patch('os.path.isfile', MagicMock(return_value=False))
|
||||
def test_keys(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user