tests: Attempt to reset hostnames via pytest

This commit is contained in:
Lauri Võsandi 2017-05-01 16:49:11 +00:00
parent f7248cb8d8
commit bebfb137d6
2 changed files with 4 additions and 4 deletions

View File

@ -21,10 +21,6 @@ cache:
- $HOME/.cache/pip
addons:
hostname: ca
hosts:
- ca.example.lan ca
- vpn.example.lan
- ipsec.example.lan
apt:
packages:
- python-configparser

View File

@ -36,6 +36,10 @@ def generate_csr(cn=None):
def test_cli_setup_authority():
import shutil
import os
with open("/etc/hosts", "w") as fh:
fh.write("127.0.0.1 localhost\n")
fh.write("127.0.0.1 ca.example.lan ca\n")
fh.write("127.0.0.1 vpn.example.lan\n")
if os.path.exists("/run/certidude/signer.pid"):
with open("/run/certidude/signer.pid") as fh:
try: