Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: commits

[6897] cherokee/trunk/qa: Adds two new QA tests for checking the HSTS support.

 

 

Cherokee commits RSS feed   Index | Next | Previous | View Threaded


cherokee at cherokee-project

Oct 7, 2011, 2:02 PM

Post #1 of 1 (197 views)
Permalink
[6897] cherokee/trunk/qa: Adds two new QA tests for checking the HSTS support.

Revision: 6897
http://svn.cherokee-project.com/changeset/6897
Author: alo
Date: 2011-10-07 23:02:04 +0200 (Fri, 07 Oct 2011)
Log Message:
-----------
Adds two new QA tests for checking the HSTS support.

Modified Paths:
--------------
cherokee/trunk/qa/Makefile.am

Added Paths:
-----------
cherokee/trunk/qa/293-HSTS-subdomains1.py
cherokee/trunk/qa/294-HSTS-subdomains2.py

Added: cherokee/trunk/qa/293-HSTS-subdomains1.py
===================================================================
--- cherokee/trunk/qa/293-HSTS-subdomains1.py (rev 0)
+++ cherokee/trunk/qa/293-HSTS-subdomains1.py 2011-10-07 21:02:04 UTC (rev 6897)
@@ -0,0 +1,28 @@
+from base import *
+
+NICK = "test-293"
+
+CONF = """
+vserver!2930!nick = %(NICK)s
+vserver!2930!document_root = %(droot)s
+vserver!2930!hsts = 1
+vserver!2930!hsts!subdomains = 1
+vserver!2930!rule!1!match = default
+vserver!2930!rule!1!handler = dirlist
+"""
+
+class Test (TestBase):
+ def __init__ (self):
+ TestBase.__init__ (self, __file__)
+ self.name = "HSTS: with Subdomains"
+ self.request = "HTTP / HTTP/1.0\r\n" + \
+ "Host: %s\r\n" %(NICK)
+ self.expected_error = 301
+ self.expected_content = ["Strict-Transport-Security:", "includeSubdomains"]
+
+ def Prepare (self, www):
+ droot = self.Mkdir (www, "%s_droot"%(NICK))
+
+ vars = globals()
+ vars.update(locals())
+ self.conf = CONF %(vars)

Added: cherokee/trunk/qa/294-HSTS-subdomains2.py
===================================================================
--- cherokee/trunk/qa/294-HSTS-subdomains2.py (rev 0)
+++ cherokee/trunk/qa/294-HSTS-subdomains2.py 2011-10-07 21:02:04 UTC (rev 6897)
@@ -0,0 +1,29 @@
+from base import *
+
+NICK = "test-294"
+
+CONF = """
+vserver!2940!nick = %(NICK)s
+vserver!2940!document_root = %(droot)s
+vserver!2940!hsts = 1
+vserver!2940!hsts!subdomains = 0
+vserver!2940!rule!1!match = default
+vserver!2940!rule!1!handler = dirlist
+"""
+
+class Test (TestBase):
+ def __init__ (self):
+ TestBase.__init__ (self, __file__)
+ self.name = "HSTS: without Subdomains"
+ self.request = "HTTP / HTTP/1.0\r\n" + \
+ "Host: %s\r\n" %(NICK)
+ self.expected_error = 301
+ self.expected_content = ["Strict-Transport-Security:"]
+ self.forbidden_content = ["includeSubdomains"]
+
+ def Prepare (self, www):
+ droot = self.Mkdir (www, "%s_droot"%(NICK))
+
+ vars = globals()
+ vars.update(locals())
+ self.conf = CONF %(vars)

Modified: cherokee/trunk/qa/Makefile.am
===================================================================
--- cherokee/trunk/qa/Makefile.am 2011-10-07 21:02:01 UTC (rev 6896)
+++ cherokee/trunk/qa/Makefile.am 2011-10-07 21:02:04 UTC (rev 6897)
@@ -313,7 +313,9 @@
289-Connection_TE.py \
290-Question-mark-in-name.py \
291-Redir-keepalive.py \
-292-HSTS1.py
+292-HSTS1.py \
+293-HSTS-subdomains1.py \
+294-HSTS-subdomains2.py

test:
python -m compileall .

Cherokee commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.