[Inteproxy-commits] r267 - in trunk: . test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 3 13:33:15 CEST 2010


Author: bh
Date: 2010-09-03 13:33:14 +0200 (Fri, 03 Sep 2010)
New Revision: 267

Modified:
   trunk/ChangeLog
   trunk/test/test_create_rewrite_rules.py
Log:
Adapt test cases to recent changes:
* test/test_create_rewrite_rules.py
(TestCreateRewriteRules.run_test): Provide the --server-prefix
option when running create-rewrite-rules.py.
(TestCreateRewriteRules.test_create_rewrite_rules_no_wild_cards)
(TestCreateRewriteRules.test_create_rewrite_rules_wild_cards)
(TestCreateRewriteRules.test_create_rewrite_rules_wild_cards_special_characters)
(TestCreateRewriteRules.test_create_rewrite_rules_port): Adapt
test to the InteProxy-Server URL rewriting changes.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-09-03 08:12:07 UTC (rev 266)
+++ trunk/ChangeLog	2010-09-03 11:33:14 UTC (rev 267)
@@ -1,3 +1,14 @@
+2010-09-03  Bernhard Herzog  <bh at intevation.de>
+
+	* test/test_create_rewrite_rules.py
+	(TestCreateRewriteRules.run_test): Provide the --server-prefix
+	option when running create-rewrite-rules.py.
+	(TestCreateRewriteRules.test_create_rewrite_rules_no_wild_cards)
+	(TestCreateRewriteRules.test_create_rewrite_rules_wild_cards)
+	(TestCreateRewriteRules.test_create_rewrite_rules_wild_cards_special_characters)
+	(TestCreateRewriteRules.test_create_rewrite_rules_port): Adapt
+	test to the InteProxy-Server URL rewriting changes.
+
 2010-09-03  Bjoern Schilberg <bjoern at intevation.de>
 
     * server/conf/inteproxy-WindowsServer2003.conf:

Modified: trunk/test/test_create_rewrite_rules.py
===================================================================
--- trunk/test/test_create_rewrite_rules.py	2010-09-03 08:12:07 UTC (rev 266)
+++ trunk/test/test_create_rewrite_rules.py	2010-09-03 11:33:14 UTC (rev 267)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 by Intevation GmbH
+# Copyright (C) 2009, 2010 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh at intevation.de>
 #
@@ -36,6 +36,7 @@
         try:
             command = [self.create_rewrite_rules_program,
                        "--config-file=" + config_filename,
+                       "--server-prefix=http://localhost:64609/",
                        "-o", rules_filename]
             process = subprocess.Popen(command, stderr=error_file)
             ret = process.wait()
@@ -55,6 +56,7 @@
 """,
                       """\
 RewriteRule ^/demo\\.intevation\\.de\\/wms$ https:/$0?user=bob&password=secret [QSA,P]
+Substitute s-https?://(demo\\.intevation\\.de\\/wms)-http://localhost:64609/$1-
 """)
 
     def test_create_rewrite_rules_wild_cards(self):
@@ -63,6 +65,7 @@
 """,
                       """\
 RewriteRule ^/[^/]*\\.intevation\\.de\\/wms\\/.*$ https:/$0?user=bob&password=secret [QSA,P]
+Substitute s-https?://([^/]*\\.intevation\\.de\\/wms\\/.*)-http://localhost:64609/$1-
 """)
 
     def test_create_rewrite_rules_wild_cards_special_characters(self):
@@ -71,6 +74,7 @@
 """,
                       """\
 RewriteRule ^/[^/]*\\.intevation\\.de\\/wms\\/.*$ https:/$0?user=bob&password=\\%24ec\\+ret\\%21 [QSA,P]
+Substitute s-https?://([^/]*\\.intevation\\.de\\/wms\\/.*)-http://localhost:64609/$1-
 """)
 
     def test_create_rewrite_rules_port(self):
@@ -79,4 +83,5 @@
 """,
                       """\
 RewriteRule ^/[^/]*\\.intevation\\.de\\:8000\\/wms\\/.*$ https:/$0?user=bob&password=secret [QSA,P]
+Substitute s-https?://([^/]*\\.intevation\\.de\\:8000\\/wms\\/.*)-http://localhost:64609/$1-
 """)



More information about the Inteproxy-commits mailing list