You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Filipe David Manana <fd...@gmail.com> on 2010/06/04 12:46:53 UTC

Re: svn commit: r951038 - /couchdb/trunk/share/www/script/test/replication.js

Thanks for applying it Jan.

Btw, that patch adds (incorrect) stuff in the design doc that is not needed
at all for the test's purpose. Must have been done late in the evening I
guess.
Can you reduce it to:

diff --git a/share/www/script/test/replication.js
b/share/www/script/test/replication.js
index d2b3164..c962759 100644
--- a/share/www/script/test/replication.js
+++ b/share/www/script/test/replication.js
@@ -350,17 +350,7 @@ couchTests.replication = function(debug) {
     {
       _id: "_design/foobar",
       language: "javascript",
-      value: "I am a design doc",
-      filters: {
-        idfilter: (function(doc, req) {
-          return doc.value == Number(req.filter_value);
-        }).toString()
-      },
-      views: {
-        countview: (function(doc) {
-          emit(doc.value, 1);
-        }).toString()
-      }
+      value: "I am a design doc"
     }
   ];

cheers



On Thu, Jun 3, 2010 at 4:41 PM, <ja...@apache.org> wrote:

> Author: jan
> Date: Thu Jun  3 15:41:51 2010
> New Revision: 951038
>
> URL: http://svn.apache.org/viewvc?rev=951038&view=rev
> Log:
> Add test case for by-doc-id replication with slashes.
>
> Patch by Filipe Manana.
>
> Closes COUCHDB-713.
>
> Modified:
>    couchdb/trunk/share/www/script/test/replication.js
>
> Modified: couchdb/trunk/share/www/script/test/replication.js
> URL:
> http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/replication.js?rev=951038&r1=951037&r2=951038&view=diff
>
> ==============================================================================
> --- couchdb/trunk/share/www/script/test/replication.js (original)
> +++ couchdb/trunk/share/www/script/test/replication.js Thu Jun  3 15:41:51
> 2010
> @@ -342,6 +342,25 @@ couchTests.replication = function(debug)
>     {
>       _id: "foo3",
>       value: "c"
> +    },
> +    {
> +      _id: "slashed/foo",
> +      value: "s"
> +    },
> +    {
> +      _id: "_design/foobar",
> +      language: "javascript",
> +      value: "I am a design doc",
> +      filters: {
> +        idfilter: (function(doc, req) {
> +          return doc.value == Number(req.filter_value);
> +        }).toString()
> +      },
> +      views: {
> +        countview: (function(doc) {
> +          emit(doc.value, 1);
> +        }).toString()
> +      }
>     }
>   ];
>
> @@ -364,7 +383,11 @@ couchTests.replication = function(debug)
>     ["foo1", "foo3", "foo666"],
>     ["foo1", "foo666"],
>     ["foo666", "foo2"],
> -    ["foo2", "foo9999", "foo1"]
> +    ["foo2", "foo9999", "foo1"],
> +    ["foo3", "slashed/foo"],
> +    ["foo3", "slashed%2Ffoo"],
> +    ["foo1", "_design/foobar"],
> +    ["foo1", "foo1001", "_design%2Ffoobar"]
>   ];
>
>   for (var i = 0; i < dbPairs.length; i++) {
>
>
>


-- 
Filipe David Manana,
fdmanana@gmail.com

"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."