summaryrefslogtreecommitdiff
path: root/test/javascript/tests/replication.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/javascript/tests/replication.js')
-rw-r--r--test/javascript/tests/replication.js65
1 files changed, 7 insertions, 58 deletions
diff --git a/test/javascript/tests/replication.js b/test/javascript/tests/replication.js
index ba586b409..7b2d379e3 100644
--- a/test/javascript/tests/replication.js
+++ b/test/javascript/tests/replication.js
@@ -22,18 +22,6 @@ couchTests.replication = function(debug) {
var dbPairsPrefixes = [
{
- source: "",
- target: ""
- },
- {
- source: CouchDB.protocol + host + "/",
- target: ""
- },
- {
- source: "",
- target: CouchDB.protocol + host + "/"
- },
- {
source: CouchDB.protocol + host + "/",
target: CouchDB.protocol + host + "/"
}
@@ -585,25 +573,10 @@ couchTests.replication = function(debug) {
//TEquals(sourceInfo.update_seq, repResult.source_last_seq);
}
-
- // test error when source database does not exist
- try {
- CouchDB.replicate("foobar", "test_suite_db");
- T(false, "should have failed with db_not_found error");
- } catch (x) {
- TEquals("db_not_found", x.error);
- }
-
- // validate COUCHDB-317
- try {
- CouchDB.replicate("/foobar", "test_suite_db");
- T(false, "should have failed with db_not_found error");
- } catch (x) {
- TEquals("db_not_found", x.error);
- }
-
try {
- CouchDB.replicate(CouchDB.protocol + host + "/foobar", "test_suite_db");
+ var rep_src = CouchDB.protocol + host + "/foobar";
+ var rep_tgt = CouchDB.protocol + host + "/test_suite_db";
+ CouchDB.replicate(rep_src, rep_tgt);
T(false, "should have failed with db_not_found error");
} catch (x) {
TEquals("db_not_found", x.error);
@@ -1591,18 +1564,6 @@ couchTests.replication = function(debug) {
dbPairsPrefixes = [
{
- source: "",
- target: ""
- },
- {
- source: CouchDB.protocol + host + "/",
- target: ""
- },
- {
- source: "",
- target: CouchDB.protocol + "joe:erly@" + host + "/"
- },
- {
source: CouchDB.protocol + host + "/",
target: CouchDB.protocol + "joe:erly@" + host + "/"
}
@@ -1660,18 +1621,6 @@ couchTests.replication = function(debug) {
// case 2) user triggering the replication is not a reader (nor admin) of the source DB
dbPairsPrefixes = [
{
- source: "",
- target: ""
- },
- {
- source: CouchDB.protocol + "joe:erly@" + host + "/",
- target: ""
- },
- {
- source: "",
- target: CouchDB.protocol + host + "/"
- },
- {
source: CouchDB.protocol + "joe:erly@" + host + "/",
target: CouchDB.protocol + host + "/"
}
@@ -1745,7 +1694,7 @@ couchTests.replication = function(debug) {
TEquals(true, sourceDb.save(doc).ok);
repResult = CouchDB.replicate(
- sourceDb.name,
+ CouchDB.protocol + host + "/" + sourceDb.name,
CouchDB.protocol + host + "/" + targetDb.name
);
TEquals(true, repResult.ok);
@@ -1768,7 +1717,7 @@ couchTests.replication = function(debug) {
TEquals(true, sourceDb.save(doc).ok);
repResult = CouchDB.replicate(
- sourceDb.name,
+ CouchDB.protocol + host + "/" + sourceDb.name,
CouchDB.protocol + host + "/" + targetDb.name
);
TEquals(true, repResult.ok);
@@ -1819,7 +1768,7 @@ couchTests.replication = function(debug) {
repResult = CouchDB.replicate(
CouchDB.protocol + host + "/" + sourceDb.name,
- targetDb.name,
+ CouchDB.protocol + host + "/" + sourceDb.name,
{
body: {
continuous: true,
@@ -1880,7 +1829,7 @@ couchTests.replication = function(debug) {
repResult = CouchDB.replicate(
CouchDB.protocol + host + "/" + sourceDb.name,
- targetDb.name,
+ CouchDB.protocol + host + "/" + targetDb.name,
{
body: {
continuous: true