Commit cb71193b authored by Vincent Bechu's avatar Vincent Bechu

replicatestorage: add signature_storage

parent 1ecc04a5
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
this._signature_sub_storage = jIO.createJIO({ this._signature_sub_storage = jIO.createJIO({
type: "document", type: "document",
document_id: this._signature_hash, document_id: this._signature_hash,
sub_storage: spec.local_sub_storage sub_storage: spec.signature_storage || spec.local_sub_storage
}); });
this._use_remote_post = spec.use_remote_post || false; this._use_remote_post = spec.use_remote_post || false;
......
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
} }
jIO.addStorage('replicatestorage500', Storage500); jIO.addStorage('replicatestorage500', Storage500);
function Storage2713() {
return this;
}
jIO.addStorage('signaturestorage2713', Storage2713);
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// replicateStorage.constructor // replicateStorage.constructor
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -79,6 +84,9 @@ ...@@ -79,6 +84,9 @@
remote_sub_storage: { remote_sub_storage: {
type: "replicatestorage500" type: "replicatestorage500"
}, },
signature_storage: {
type: "signaturestorage2713"
},
query: {query: 'portal_type: "Foo"', limit: [0, 1234567890]}, query: {query: 'portal_type: "Foo"', limit: [0, 1234567890]},
use_remote_post: true, use_remote_post: true,
conflict_handling: 3, conflict_handling: 3,
...@@ -103,6 +111,8 @@ ...@@ -103,6 +111,8 @@
equal(jio.__storage._check_remote_deletion, false); equal(jio.__storage._check_remote_deletion, false);
equal(jio.__storage._check_remote_modification, false); equal(jio.__storage._check_remote_modification, false);
equal(jio.__storage._signature_sub_storage.__storage._sub_storage.__type,
"signaturestorage2713");
equal(jio.__storage._signature_hash, equal(jio.__storage._signature_hash,
"_replicate_11881e431308c0ec8c0e6430be98db380e1b92f8"); "_replicate_11881e431308c0ec8c0e6430be98db380e1b92f8");
}); });
......
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