letsencrypt: Disable test when sudo is not available

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Federico Ceratto 2017-10-26 21:25:13 +01:00 committed by Sunil Mohan Adapa
parent 8ace9046c3
commit f0c0d6dcf5
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -19,13 +19,16 @@ Tests for letsencrypt module.
"""
import os
import os.path
import unittest
from .. import on_domain_added, on_domain_removed
euid = os.geteuid()
sudo_available = os.path.isfile("/usr/bin/sudo")
@unittest.skipUnless(sudo_available, 'Requires sudo')
class TestDomainNameChanges(unittest.TestCase):
"""Test for automatically obtaining and revoking Let's Encrypt certs"""