From 242f32c7f567dcd2ee35f46c07c9ecf2adf954f6 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 2 Oct 2015 11:10:43 -0400 Subject: Add a test for reverse proxy SNI --- test/test.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test/test.py') diff --git a/test/test.py b/test/test.py index 721d210..c471fdb 100644 --- a/test/test.py +++ b/test/test.py @@ -20,7 +20,9 @@ class test_suite1(Declarative): def setUpClass(cls): write_template_file('suite1.tmpl', 'work/httpd/conf/test.conf', {'DBPREFIX': os.environ.get('DBPREFIX', ''), - 'SNI': 'off'} + 'SNI': 'off', + 'PRESERVEHOST': 'Off', + } ) # Generate a single VH to do negative SNI testing write_template_file('sni.tmpl', 'work/httpd/conf.d/sni1.conf', @@ -260,7 +262,7 @@ class test_suite1(Declarative): ), dict( - desc='Make non-SNI request', + desc='SNI request when SNI is disabled', request=('/index.html', {'host': 'www1.example.com', 'port': 8000} ), @@ -268,4 +270,10 @@ class test_suite1(Declarative): expected_str='doesn\'t match', ), + dict( + desc='Reverse proxy request when SNI is disabled', + request=('/proxy/index.html', {}), + expected=400, + ), + ] -- cgit