test("with a new channel document", function(test) {
  coux.post(testDb, newChannelDoc, function(err, ok) {
    chId = ok.id;
    test.ok(ok.id, "has an id");
    console.log("chId", chId)
    test.end();
  });
});
test("with a new channel document without owner_id", function(test) {
  coux.post(testDb, {
    type: "channel",
    state: "new"
  }, function(err, ok) {
    chId = ok.id;
    test.ok(ok.id);
    test.end();
  });
});
 }, e(function() {
     var repdef = {
         continuous : CONTINUOUS,
         source : master,
         target : dbName
     };
     if (FILTER) {
         repdef.filter = "filter/random";
         repdef.query_params = {rand:Math.round(Math.random() * 100).toString()};
     }
     coux.post(replicator, repdef, e(function() {
         cb()
     }));
 }))
 asyncFold(dbs2, function(db, cb) {
     var rpc = url.parse(db)
         , dbName = rpc.pathname.split('/')[1];
     rpc.pathname = "/_replicate";
     var replicator = url.format(rpc);
     coux.post(replicator, {
         continuous : CONTINUOUS,
         source : dbName,
         target : master
     }, e(function() {
         var repdef = {
             continuous : CONTINUOUS,
             source : master,
             target : dbName
         };
         if (FILTER) {
             repdef.filter = "filter/random";
             repdef.query_params = {rand:Math.round(Math.random() * 100).toString()};
         }
         coux.post(replicator, repdef, e(function() {
             cb()
         }));
     }))
 }, function() {