mirror of
https://github.com/containers/udica
synced 2024-09-24 10:20:44 +02:00
Do not reset CWD in tests
Previously, due to bug in load_policy(), the current working directory
was not properly reset and the tests had to reset it. The issue was
fixed in ffbe67245b
, so the tests does not
need to reset it anymore.
This commit is contained in:
parent
aa670b8a93
commit
3b07ca9246
@ -74,8 +74,6 @@ class TestMain(unittest.TestCase):
|
||||
udica.policy.TEMPLATES_STORE = "../udica/templates"
|
||||
# FIXME: the policy module is using global variable which must be reset to []
|
||||
udica.policy.templates_to_load = []
|
||||
# FIXME: the load_policy function is not properly restoring current working directory
|
||||
self.cwd = os.getcwd()
|
||||
|
||||
# Remove current directory from sys.path so that the proper selinux and semanage modules are
|
||||
# loaded (instead of the mock ones in this directory).
|
||||
@ -107,8 +105,6 @@ class TestMain(unittest.TestCase):
|
||||
if templates:
|
||||
self.assertRegex(mock_out.output, udica.policy.TEMPLATES_STORE + '/' + templates)
|
||||
|
||||
os.chdir(self.cwd)
|
||||
|
||||
self.assertTrue(os.path.isfile('my_container.cil'))
|
||||
|
||||
if policy_file:
|
||||
|
Loading…
Reference in New Issue
Block a user