Commit 3709ae64 authored by Sven Franck's avatar Sven Franck

updated dummystorage

parent 79febcd5
...@@ -81,18 +81,17 @@ ...@@ -81,18 +81,17 @@
rev:generateRevision(command, "putAttachment", true) rev:generateRevision(command, "putAttachment", true)
}); });
}, 100); // 100 ms, for jiotests simple job waiting }, 100); // 100 ms, for jiotests simple job waiting
}; // end put }; // end putAttachment
that.get = function (command) { that.get = function (command) {
setTimeout(function () { setTimeout(function () {
that.success ({ that.success ({
_id:command.getDocId(), _id:command.getDocId(),
content:'content', _rev:generateRevision(command, "get", true),
_creation_date: 10000, content:'content'
_last_modified: 15000
}); });
}, 100); }, 100);
}; // end get }; // end get // 100 ms, for jiotests simple job waiting
that.allDocs = function (command) { that.allDocs = function (command) {
setTimeout(function () { setTimeout(function () {
...@@ -101,32 +100,24 @@ ...@@ -101,32 +100,24 @@
rows: [{ rows: [{
id:'file', id:'file',
key:'file', key:'file',
value: { value: {"rev":generateRevision(command, "allDocs", true)}
content:'filecontent',
_creation_date:10000,
_last_modified:15000
}
},{ },{
id:'memo', id:'memo',
key:'memo', key:'memo',
value: { value: {"rev":generateRevision(command, "allDocs", true)}
content:'memocontent',
_creation_date:20000,
_last_modified:25000
}
}] }]
}; };
if (command.getOption('metadata_only')) { that.success(o);
delete o.rows[0].value.content;
delete o.rows[1].value.content;
}
that.success (o);
}, 100); }, 100);
}; // end allDocs }; // end allDocs
that.remove = function (command) { that.remove = function (command) {
setTimeout (function () { setTimeout (function () {
that.success ({ok:true,id:command.getDocId()}); that.success({
ok:true,
id:command.getDocId(),
rev:generateRevision(command, "get", true)
});
}, 100); }, 100);
}; // end remove }; // end remove
......
...@@ -218,8 +218,8 @@ var newLocalStorage = function (spec, my) { ...@@ -218,8 +218,8 @@ var newLocalStorage = function (spec, my) {
return priv.manageOptions( return priv.manageOptions(
{ok:true,id:document_id,rev:document_rev}, command, doc); {ok:true,id:document_id,rev:document_rev}, command, doc);
} }
// ================== storage overrides =====================
// ===================== overrides ======================
that.serialized = function () { that.serialized = function () {
return { return {
"applicationname": priv.applicationname, "applicationname": priv.applicationname,
...@@ -227,7 +227,6 @@ var newLocalStorage = function (spec, my) { ...@@ -227,7 +227,6 @@ var newLocalStorage = function (spec, my) {
}; };
}; };
// Overrinding validateState()
that.validateState = function() { that.validateState = function() {
if (priv.username) { if (priv.username) {
return ''; return '';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment