From ba84b7ab4974a22f046ca1bab29cc17ccf3034bd Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Thu, 28 Sep 2017 01:51:28 +0300 Subject: [PATCH] Add test to prevent regressions of #4183 (#5134) --- certbot-apache/certbot_apache/tests/configurator_test.py | 4 ++-- .../apache2/sites-available/encryption-example.conf | 4 ++-- certbot-apache/certbot_apache/tests/util.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/certbot-apache/certbot_apache/tests/configurator_test.py b/certbot-apache/certbot_apache/tests/configurator_test.py index dbb84b790..1d6dd9b05 100644 --- a/certbot-apache/certbot_apache/tests/configurator_test.py +++ b/certbot-apache/certbot_apache/tests/configurator_test.py @@ -172,7 +172,7 @@ class MultipleVhostsTest(util.ApacheTest): def test_get_aug_internal_path(self): from certbot_apache.configurator import get_internal_aug_path internal_paths = [ - "VirtualHost", "IfModule/VirtualHost", "VirtualHost", "VirtualHost", + "Virtualhost", "IfModule/VirtualHost", "VirtualHost", "VirtualHost", "Macro/VirtualHost", "IfModule/VirtualHost", "VirtualHost", "IfModule/VirtualHost"] @@ -755,7 +755,7 @@ class MultipleVhostsTest(util.ApacheTest): "encryption-example-le-ssl.conf")) self.assertEqual(ssl_vhost.path, - "/files" + ssl_vhost.filep + "/IfModule/VirtualHost") + "/files" + ssl_vhost.filep + "/IfModule/Virtualhost") self.assertEqual(len(ssl_vhost.addrs), 1) self.assertEqual(set([obj.Addr.fromstring("*:443")]), ssl_vhost.addrs) self.assertEqual(ssl_vhost.name, "encryption-example.demo") diff --git a/certbot-apache/certbot_apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf b/certbot-apache/certbot_apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf index 4786bda13..862040fc1 100644 --- a/certbot-apache/certbot_apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf +++ b/certbot-apache/certbot_apache/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf @@ -1,4 +1,4 @@ - + ServerName encryption-example.demo ServerAdmin webmaster@localhost @@ -39,4 +39,4 @@ Allow from 127.0.0.0/255.0.0.0 ::1/128 - + diff --git a/certbot-apache/certbot_apache/tests/util.py b/certbot-apache/certbot_apache/tests/util.py index a45357594..34d2476f7 100644 --- a/certbot-apache/certbot_apache/tests/util.py +++ b/certbot-apache/certbot_apache/tests/util.py @@ -124,7 +124,7 @@ def get_vh_truth(temp_dir, config_name): vh_truth = [ obj.VirtualHost( os.path.join(prefix, "encryption-example.conf"), - os.path.join(aug_pre, "encryption-example.conf/VirtualHost"), + os.path.join(aug_pre, "encryption-example.conf/Virtualhost"), set([obj.Addr.fromstring("*:80")]), False, True, "encryption-example.demo"), obj.VirtualHost(