mirror of
https://github.com/systemd/systemd
synced 2024-07-22 18:55:10 +00:00
networkd-test.py: hide default .network files
To make the test works fine with -Ddefault-network=True.
This commit is contained in:
parent
93252bfea7
commit
2e978188cb
|
@ -87,6 +87,12 @@ def setUpModule():
|
|||
# Ensure the unit directory exists so tests can dump files into it.
|
||||
os.makedirs(NETWORK_UNITDIR, exist_ok=True)
|
||||
|
||||
# mask all default .network files
|
||||
if os.path.exists('/usr/lib/systemd/network'):
|
||||
for unit in os.listdir('/usr/lib/systemd/network'):
|
||||
if unit.endswith('.network'):
|
||||
os.symlink('/dev/null', os.path.join(NETWORK_UNITDIR, unit))
|
||||
|
||||
|
||||
def tearDownModule():
|
||||
global tmpmounts
|
||||
|
|
Loading…
Reference in a new issue