summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-08-18 15:17:29 +0000
committerJan Lehnardt <jan@apache.org>2009-08-18 15:17:29 +0000
commit3d96395f24baf66956de819a83bd3615ba45d721 (patch)
treebe9647cb4c16b08af9e83075378d063870bfaf7a
parent7499f6c0547b4ec35d60df390d835615f7de06e6 (diff)
unset new config values on run_on_modified_server rollback
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@805445 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--share/www/script/couch_tests.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js
index 802db6f8..255c0228 100644
--- a/share/www/script/couch_tests.js
+++ b/share/www/script/couch_tests.js
@@ -117,10 +117,16 @@ function run_on_modified_server(settings, fun) {
// unset the settings
for(var j=0; j < i; j++) {
var s = settings[j];
- CouchDB.request("PUT", "/_config/" + s.section + "/" + s.key, {
- body: s.oldValue,
- headers: {"X-Couch-Persist": "false"}
- });
+ 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"}
+ });
+ }
}
}
}