Test "install --nginx" w/ misconfiguration

This commit is contained in:
Peter Eckersley 2015-10-18 11:05:58 -07:00
parent 995c1dfb83
commit 63f4f11360

View file

@ -105,6 +105,15 @@ class CLITest(unittest.TestCase):
else:
self.assertTrue("The requested apache plugin does not appear" in ret)
# Sending nginx a non-existent conf dir will simulate misconfiguration
args = ["install", "--nginx", "--cert-path", "/tmp/blah", "--key-path", "/tmp/blah",
"--nginx-server-root", "/nonexistent/thing"]
ret, _, _, _ = self._call(args)
if "nginx" in plugins:
self.assertTrue("The nginx plugin is not working" in ret)
else:
self.assertTrue("The requested nginx plugin does not appear" in ret)
def test_rollback(self):
_, _, _, client = self._call(['rollback'])