Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErica Portnoy <ebportnoy@gmail.com>2018-03-27 01:22:39 +0300
committerErica Portnoy <ebportnoy@gmail.com>2018-03-27 01:28:37 +0300
commit25e056fcbfd8964d048f60b10dd94397d02f822d (patch)
tree5e544aad4a54b07bab71d7fc627a99dd35e61d0b /certbot-nginx/certbot_nginx/tests/parser_test.py
parent435fd10c217c5ad248e511060d205c2e754ad4df (diff)
add test for remove duplicate ipv6only
Diffstat (limited to 'certbot-nginx/certbot_nginx/tests/parser_test.py')
-rw-r--r--certbot-nginx/certbot_nginx/tests/parser_test.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/certbot-nginx/certbot_nginx/tests/parser_test.py b/certbot-nginx/certbot_nginx/tests/parser_test.py
index 8a50555b7..4f83981ab 100644
--- a/certbot-nginx/certbot_nginx/tests/parser_test.py
+++ b/certbot-nginx/certbot_nginx/tests/parser_test.py
@@ -448,6 +448,16 @@ class NginxParserTest(util.NginxTest): #pylint: disable=too-many-public-methods
self.assertEqual(len(default.raw), len(new_vhost_parsed.raw))
self.assertTrue(next(iter(default.addrs)).super_eq(next(iter(new_vhost_parsed.addrs))))
+ def test_duplicate_vhost_remove_ipv6only(self):
+ nparser = parser.NginxParser(self.config_path)
+
+ vhosts = nparser.get_vhosts()
+ default = [x for x in vhosts if 'ipv6ssl' in x.filep][0]
+ new_vhost = nparser.duplicate_vhost(default, remove_singleton_listen_params=True)
+ nparser.filedump(ext='')
+
+ for addr in new_vhost.addrs:
+ self.assertFalse(addr.ipv6only)
if __name__ == "__main__":
unittest.main() # pragma: no cover