Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
jio
Commits
9e94fb54
Commit
9e94fb54
authored
Mar 08, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more fixes
parent
c883162c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
test/jio.storage/replicatestorage_repair.tests.js
test/jio.storage/replicatestorage_repair.tests.js
+21
-13
No files found.
test/jio.storage/replicatestorage_repair.tests.js
View file @
9e94fb54
...
...
@@ -3298,7 +3298,7 @@
test
(
"
signature document is not synced
"
,
function
()
{
stop
();
expect
(
6
);
expect
(
7
);
var
context
=
this
;
...
...
@@ -3307,26 +3307,34 @@
this
.
jio
=
jIO
.
createJIO
({
type
:
"
replicate
"
,
local_sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
document
"
,
document_id
:
"
/
"
,
sub_storage
:
{
type
:
"
local
"
,
sessiononly
:
true
}
}
type
:
"
memory
"
},
remote_sub_storage
:
{
type
:
"
memory
"
}
});
// Hack to ensure that the signature is stored in the
// same local storage, even if memory is used
context
.
jio
.
__storage
.
_signature_sub_storage
.
__storage
.
_sub_storage
.
__storage
.
_sub_storage
.
__storage
.
_database
=
context
.
jio
.
__storage
.
_local_sub_storage
.
__storage
.
_database
;
context
.
jio
.
p
ost
(
{
"
title
"
:
"
foo
"
})
context
.
jio
.
p
ut
(
'
barfoo
'
,
{
"
title
"
:
"
foo
"
})
.
then
(
function
()
{
return
context
.
jio
.
repair
();
})
.
then
(
function
()
{
// Check that signature is a local document
// Otherwise, the test is meaningless
return
context
.
jio
.
__storage
.
_local_sub_storage
.
get
(
context
.
jio
.
__storage
.
_signature_hash
);
})
.
then
(
function
(
result
)
{
deepEqual
(
result
,
{});
return
context
.
jio
.
__storage
.
_remote_sub_storage
.
get
(
context
.
jio
.
__storage
.
_signature_hash
);
...
...
@@ -3334,7 +3342,7 @@
.
fail
(
function
(
error
)
{
ok
(
error
instanceof
jIO
.
util
.
jIOError
);
equal
(
error
.
message
,
"
Cannot find document:
"
+
"
_replicate_
8662994dcefb3a2ceec61e86953efda8ec6520d6
"
);
"
_replicate_
a0538a9def720b35ac7fd813d2ca008a5183375a
"
);
equal
(
error
.
status_code
,
404
);
})
.
then
(
function
()
{
...
...
@@ -3348,7 +3356,7 @@
.
fail
(
function
(
error
)
{
ok
(
error
instanceof
jIO
.
util
.
jIOError
);
equal
(
error
.
message
,
"
Cannot find document:
"
+
"
_replicate_
8662994dcefb3a2ceec61e86953efda8ec6520d6
"
);
"
_replicate_
a0538a9def720b35ac7fd813d2ca008a5183375a
"
);
equal
(
error
.
status_code
,
404
);
})
.
fail
(
function
(
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment