]> git.ipfire.org Git - thirdparty/lldpd.git/blob - tests/integration/conftest.py
tests: replace integration test by py.test+namespace tests
[thirdparty/lldpd.git] / tests / integration / conftest.py
1 import pytest
2 from fixtures.programs import *
3 from fixtures.namespaces import *
4 from fixtures.network import *
5
6
7 @pytest.yield_fixture(autouse=True, scope='session')
8 def root():
9 """Ensure we are somewhat root."""
10 # We could do a user namespace but there are too many
11 # restrictions: we cannot do arbitrary user mapping and therefore,
12 # this doesn't play well with privilege separation and the use of
13 # _lldpd. Just do a plain namespace.
14 with Namespace('pid', 'net', 'mnt', 'ipc', 'uts'):
15 yield