diff options
Diffstat (limited to 'share/www/script/couch_tests.js')
-rw-r--r-- | share/www/script/couch_tests.js | 70 |
1 files changed, 12 insertions, 58 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index 5ae4f1d9..0b8f9288 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -13,12 +13,15 @@ // Used by replication test if (typeof window == 'undefined' || !window) { CouchDB.host = "127.0.0.1:5984"; + CouchDB.protocol = "http://"; CouchDB.inBrowser = false; } else { CouchDB.host = window.location.host; CouchDB.inBrowser = true; + CouchDB.protocol = window.location.protocol + "//"; } +CouchDB.urlPrefix = ".."; var couchTests = {}; function loadTest(file) { @@ -33,7 +36,9 @@ loadTest("attachments.js"); loadTest("attachments_multipart.js"); loadTest("attachment_names.js"); loadTest("attachment_paths.js"); +loadTest("attachment_ranges.js"); loadTest("attachment_views.js"); +loadTest("auth_cache.js"); loadTest("batch_save.js"); loadTest("bulk_docs.js"); loadTest("changes.js"); @@ -57,18 +62,23 @@ loadTest("jsonp.js"); loadTest("large_docs.js"); loadTest("list_views.js"); loadTest("lots_of_docs.js"); +loadTest("method_override.js"); loadTest("multiple_rows.js"); loadScript("script/oauth.js"); loadScript("script/sha1.js"); loadTest("oauth.js"); +loadTest("proxyauth.js"); loadTest("purge.js"); +loadTest("reader_acl.js"); loadTest("recreate_doc.js"); loadTest("reduce.js"); loadTest("reduce_builtin.js"); loadTest("reduce_false.js"); loadTest("reduce_false_temp.js"); loadTest("replication.js"); +loadTest("replicator_db.js"); loadTest("rev_stemming.js"); +loadTest("rewrite.js"); loadTest("security_validation.js"); loadTest("show_documents.js"); loadTest("stats.js"); @@ -79,6 +89,7 @@ loadTest("uuids.js"); loadTest("view_collation.js"); loadTest("view_collation_raw.js"); loadTest("view_conflicts.js"); +loadTest("view_compaction.js"); loadTest("view_errors.js"); loadTest("view_include_docs.js"); loadTest("view_multi_key_all_docs.js"); @@ -87,64 +98,7 @@ loadTest("view_multi_key_temp.js"); loadTest("view_offsets.js"); loadTest("view_pagination.js"); loadTest("view_sandboxing.js"); +loadTest("view_update_seq.js"); loadTest("view_xml.js"); // keep sorted - -function makeDocs(start, end, templateDoc) { - var templateDocSrc = templateDoc ? JSON.stringify(templateDoc) : "{}" - if (end === undefined) { - end = start; - start = 0; - } - var docs = [] - for (var i = start; i < end; i++) { - var newDoc = eval("(" + templateDocSrc + ")"); - newDoc._id = (i).toString(); - newDoc.integer = i; - newDoc.string = (i).toString(); - docs.push(newDoc) - } - return docs; -} - -function run_on_modified_server(settings, fun) { - try { - // set the settings - for(var i=0; i < settings.length; i++) { - var s = settings[i]; - var xhr = CouchDB.request("PUT", "/_config/" + s.section + "/" + s.key, { - body: JSON.stringify(s.value), - headers: {"X-Couch-Persist": "false"} - }); - CouchDB.maybeThrowError(xhr); - s.oldValue = xhr.responseText; - } - // run the thing - fun(); - } finally { - // unset the settings - for(var j=0; j < i; j++) { - var s = settings[j]; - if(s.oldValue == "\"\"\n") { // unset value - CouchDB.request("DELETE", "/_config/" + s.section + "/" + s.key, { - headers: {"X-Couch-Persist": "false"} - }); - } else { - CouchDB.request("PUT", "/_config/" + s.section + "/" + s.key, { - body: s.oldValue, - headers: {"X-Couch-Persist": "false"} - }); - } - } - } -} - -function stringFun(fun) { - var string = fun.toSource ? fun.toSource() : "(" + fun.toString() + ")"; - return string; -} - -function restartServer() { - CouchDB.request("POST", "/_restart"); -} |