Compare commits

...

1 Commits

Author SHA1 Message Date
Joona Hoikkala
43884eb18e Add test to prevent regressions of #4183 2017-09-26 12:13:01 +03:00
3 changed files with 5 additions and 5 deletions

View File

@@ -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")

View File

@@ -1,4 +1,4 @@
<VirtualHost *:80>
<Virtualhost *:80>
ServerName encryption-example.demo
ServerAdmin webmaster@localhost
@@ -39,4 +39,4 @@
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
</Virtualhost>

View File

@@ -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(