From bebfb137d6cfcdc4fe572840b92fc830b0f875a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Mon, 1 May 2017 16:49:11 +0000 Subject: [PATCH] tests: Attempt to reset hostnames via pytest --- .travis.yml | 4 ---- tests/test_cli.py | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb0c47a..c2a092d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tests/test_cli.py b/tests/test_cli.py index 9c978f0..ca3799e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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: