couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [2/9] git commit: Failing unit test for vhosts with a path
Date Wed, 29 Feb 2012 11:09:58 GMT
Failing unit test for vhosts with a path


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9f90fe45
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9f90fe45
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9f90fe45

Branch: refs/heads/COUCHDB-1416
Commit: 9f90fe45bd335d9d809ac6d3107919af71490e79
Parents: 33db943
Author: Jason Smith (air) <jhs@apache.org>
Authored: Wed Feb 29 11:08:05 2012 +0000
Committer: Jason Smith (air) <jhs@apache.org>
Committed: Wed Feb 29 11:08:05 2012 +0000

----------------------------------------------------------------------
 share/www/script/test/rewrite.js |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9f90fe45/share/www/script/test/rewrite.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/rewrite.js b/share/www/script/test/rewrite.js
index c69c216..99acbf3 100644
--- a/share/www/script/test/rewrite.js
+++ b/share/www/script/test/rewrite.js
@@ -445,7 +445,9 @@ couchTests.rewrite = function(debug) {
       rewrites: [
           {"from":"testShow", "to":"_show/show_requested_path"},
           {"from":"path/testShow","to":"_show/show_requested_path"},
-          {"from":"_config/*","to":"../../../_config/*"},
+
+          {"from":"_config/*"     , "to":"../../../_config/*"},
+          {"from":"path/_config/*", "to":"../../../_config/*"},
 
           {"from":"one", "to":"_rewrite/two"},
           {"from":"two", "to":"_rewrite/three"},
@@ -492,5 +494,12 @@ couchTests.rewrite = function(debug) {
       var res = CouchDB.request("GET", "/testShow");
       TEquals('/testShow', res.responseText, "requested_path should equal requested");
     });
+
+    // Test the controversial vost with a path.
+    vhosts.key = encodeURIComponent(CouchDB.host + '/path');
+    run_on_modified_server([vhosts], function() {
+      var res = CouchDB.request("GET", "/path/testShow");
+      TEquals('/path/testShow', res.responseText, "requested_path should equal requested");
+    });
   });
 }


Mime
View raw message