couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r986614 - /couchdb/trunk/share/www/script/test/replicator_db.js
Date Wed, 18 Aug 2010 10:00:11 GMT
Author: fdmanana
Date: Wed Aug 18 10:00:11 2010
New Revision: 986614

URL: http://svn.apache.org/viewvc?rev=986614&view=rev
Log:
Test that design docs get replicated in a continuous replication when the replication is triggered
by a replication doc.

Modified:
    couchdb/trunk/share/www/script/test/replicator_db.js

Modified: couchdb/trunk/share/www/script/test/replicator_db.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/replicator_db.js?rev=986614&r1=986613&r2=986614&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/replicator_db.js (original)
+++ couchdb/trunk/share/www/script/test/replicator_db.js Wed Aug 18 10:00:11 2010
@@ -200,6 +200,21 @@ couchTests.replicator_db = function(debu
     T(repDoc1.state === "triggered");
     T(typeof repDoc1.replication_id  === "string");
 
+    // add a design doc to source, it will be replicated to target
+    // when the "user_ctx" property is not defined in the replication doc,
+    // the replication will be done under an _admin context, therefore
+    // design docs will be replicated
+    var ddoc = {
+      _id: "_design/foobar",
+      language: "javascript"
+    };
+
+    T(dbA.save(ddoc).ok);
+
+    waitForSeq(dbA, dbB);
+    var ddoc_copy = dbB.open("_design/foobar");
+    T(ddoc_copy !== null);
+
     // stop replication by deleting the replication document
     T(repDb.deleteDoc(repDoc1).ok);
 



Mime
View raw message