1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-22 16:25:17 +00:00

tests: Check for existence of /etc/openvpn

This commit is contained in:
Lauri Võsandi 2017-05-01 16:39:12 +00:00
parent 2629709709
commit f7248cb8d8

View File

@ -59,11 +59,12 @@ def test_cli_setup_authority():
os.unlink("/etc/certidude/client.conf") os.unlink("/etc/certidude/client.conf")
# Remove OpenVPN stuff # Remove OpenVPN stuff
for filename in os.listdir("/etc/openvpn"): if os.path.exists("/etc/openvpn"):
if filename.endswith(".conf"): for filename in os.listdir("/etc/openvpn"):
os.unlink(os.path.join("/etc/openvpn", filename)) if filename.endswith(".conf"):
if os.path.exists("/etc/openvpn/keys"): os.unlink(os.path.join("/etc/openvpn", filename))
shutil.rmtree("/etc/openvpn/keys") if os.path.exists("/etc/openvpn/keys"):
shutil.rmtree("/etc/openvpn/keys")
from certidude import const from certidude import const