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
8569c867
Commit
8569c867
authored
Jan 08, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename applicationname to application_name
parent
d7efabc2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
43 deletions
+43
-43
src/jio.dummystorages.js
src/jio.dummystorages.js
+1
-1
src/jio.storage/davstorage.js
src/jio.storage/davstorage.js
+9
-9
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+3
-3
src/jio/jioNamespace.js
src/jio/jioNamespace.js
+1
-1
test/jiotests.js
test/jiotests.js
+29
-29
No files found.
src/jio.dummystorages.js
View file @
8569c867
...
@@ -224,7 +224,7 @@
...
@@ -224,7 +224,7 @@
// so {type:'dummyall3tries',a:'b'} differs from
// so {type:'dummyall3tries',a:'b'} differs from
// {type:'dummyall3tries',c:'d'}.
// {type:'dummyall3tries',c:'d'}.
that
.
specToStore
=
function
()
{
that
.
specToStore
=
function
()
{
return
{
"
application
name
"
:
spec
.
application
name
};
return
{
"
application
_name
"
:
spec
.
application_
name
};
};
};
priv
.
doJob
=
function
(
command
,
if_ok_return
)
{
priv
.
doJob
=
function
(
command
,
if_ok_return
)
{
...
...
src/jio.storage/davstorage.js
View file @
8569c867
...
@@ -23,8 +23,8 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -23,8 +23,8 @@ var newDAVStorage = function ( spec, my ) {
priv
.
username
=
spec
.
username
||
''
;
priv
.
username
=
spec
.
username
||
''
;
priv
.
secured_username
=
priv
.
convertSlashes
(
priv
.
username
);
priv
.
secured_username
=
priv
.
convertSlashes
(
priv
.
username
);
priv
.
application
name
=
spec
.
application
name
||
'
untitled
'
;
priv
.
application
_name
=
spec
.
application_
name
||
'
untitled
'
;
priv
.
secured_application
name
=
priv
.
convertSlashes
(
priv
.
application
name
);
priv
.
secured_application
_name
=
priv
.
convertSlashes
(
priv
.
application_
name
);
priv
.
url
=
spec
.
url
||
''
;
priv
.
url
=
spec
.
url
||
''
;
priv
.
password
=
spec
.
password
||
''
;
// TODO : is it secured ?
priv
.
password
=
spec
.
password
||
''
;
// TODO : is it secured ?
...
@@ -32,7 +32,7 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -32,7 +32,7 @@ var newDAVStorage = function ( spec, my ) {
that
.
serialized
=
function
()
{
that
.
serialized
=
function
()
{
var
o
=
super_serialized
();
var
o
=
super_serialized
();
o
.
username
=
priv
.
username
;
o
.
username
=
priv
.
username
;
o
.
application
name
=
priv
.
application
name
;
o
.
application
_name
=
priv
.
application_
name
;
o
.
url
=
priv
.
url
;
o
.
url
=
priv
.
url
;
o
.
password
=
priv
.
password
;
// TODO : not realy secured...
o
.
password
=
priv
.
password
;
// TODO : not realy secured...
return
o
;
return
o
;
...
@@ -82,7 +82,7 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -82,7 +82,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
// to make url unique!
secured_docid
+
'
?_=
'
+
Date
.
now
(),
// to make url unique!
// and avoid chrome PUT on cache !
// and avoid chrome PUT on cache !
type
:
type
,
type
:
type
,
...
@@ -127,7 +127,7 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -127,7 +127,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
secured_docid
+
'
?_=
'
+
Date
.
now
(),
type
:
"
GET
"
,
type
:
"
GET
"
,
async
:
true
,
async
:
true
,
...
@@ -163,7 +163,7 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -163,7 +163,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
secured_docid
+
'
?_=
'
+
Date
.
now
(),
type
:
"
PROPFIND
"
,
type
:
"
PROPFIND
"
,
async
:
true
,
async
:
true
,
...
@@ -217,7 +217,7 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -217,7 +217,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
priv
.
secureDocId
(
file
.
id
)
+
'
?_=
'
+
Date
.
now
(),
priv
.
secureDocId
(
file
.
id
)
+
'
?_=
'
+
Date
.
now
(),
type
:
"
GET
"
,
type
:
"
GET
"
,
async
:
true
,
async
:
true
,
...
@@ -245,7 +245,7 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -245,7 +245,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
'
?_=
'
+
Date
.
now
(),
priv
.
secured_application
_
name
+
'
/
'
+
'
?_=
'
+
Date
.
now
(),
async
:
true
,
async
:
true
,
type
:
'
PROPFIND
'
,
type
:
'
PROPFIND
'
,
dataType
:
'
xml
'
,
dataType
:
'
xml
'
,
...
@@ -341,7 +341,7 @@ var newDAVStorage = function ( spec, my ) {
...
@@ -341,7 +341,7 @@ var newDAVStorage = function ( spec, my ) {
$
.
ajax
(
{
$
.
ajax
(
{
url
:
priv
.
url
+
'
/
'
+
url
:
priv
.
url
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_username
+
'
/
'
+
priv
.
secured_applicationname
+
'
/
'
+
priv
.
secured_application
_
name
+
'
/
'
+
secured_docid
+
'
?_=
'
+
Date
.
now
(),
secured_docid
+
'
?_=
'
+
Date
.
now
(),
type
:
"
DELETE
"
,
type
:
"
DELETE
"
,
async
:
true
,
async
:
true
,
...
...
src/jio.storage/localstorage.js
View file @
8569c867
...
@@ -28,10 +28,10 @@ var newLocalStorage = function (spec, my) {
...
@@ -28,10 +28,10 @@ var newLocalStorage = function (spec, my) {
// attributes
// attributes
priv
.
username
=
spec
.
username
||
''
;
priv
.
username
=
spec
.
username
||
''
;
priv
.
application
name
=
spec
.
application
name
||
'
untitled
'
;
priv
.
application
_name
=
spec
.
application_
name
||
'
untitled
'
;
priv
.
localpath
=
'
jio/localstorage/
'
+
priv
.
localpath
=
'
jio/localstorage/
'
+
priv
.
username
+
'
/
'
+
priv
.
applicationname
;
priv
.
username
+
'
/
'
+
priv
.
application
_
name
;
// ==================== Tools ====================
// ==================== Tools ====================
/**
/**
...
@@ -75,7 +75,7 @@ var newLocalStorage = function (spec, my) {
...
@@ -75,7 +75,7 @@ var newLocalStorage = function (spec, my) {
// ===================== overrides ======================
// ===================== overrides ======================
that
.
specToStore
=
function
()
{
that
.
specToStore
=
function
()
{
return
{
return
{
"
application
name
"
:
priv
.
application
name
,
"
application
_name
"
:
priv
.
application_
name
,
"
username
"
:
priv
.
username
"
username
"
:
priv
.
username
};
};
};
};
...
...
src/jio/jioNamespace.js
View file @
8569c867
...
@@ -15,7 +15,7 @@ var jioNamespace = (function(spec) {
...
@@ -15,7 +15,7 @@ var jioNamespace = (function(spec) {
* - {object} spec.storage: A storage description
* - {object} spec.storage: A storage description
* - {string} spec.storage.type: The storage type
* - {string} spec.storage.type: The storage type
* - {string} spec.storage.username: The user name
* - {string} spec.storage.username: The user name
* - {string} spec.storage.applicationname: The application name
* - {string} spec.storage.application
_
name: The application name
* @return {object} The new Jio instance.
* @return {object} The new Jio instance.
*/
*/
Object
.
defineProperty
(
that
,
"
newJio
"
,{
Object
.
defineProperty
(
that
,
"
newJio
"
,{
...
...
test/jiotests.js
View file @
8569c867
...
@@ -725,7 +725,7 @@ test ("Restore old Jio", function() {
...
@@ -725,7 +725,7 @@ test ("Restore old Jio", function() {
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
dummyall3tries
"
,
"
type
"
:
"
dummyall3tries
"
,
"
applicationname
"
:
"
jiotests
"
"
application
_
name
"
:
"
jiotests
"
});
});
o
.
jio_id
=
o
.
jio
.
getId
();
o
.
jio_id
=
o
.
jio
.
getId
();
...
@@ -737,7 +737,7 @@ test ("Restore old Jio", function() {
...
@@ -737,7 +737,7 @@ test ("Restore old Jio", function() {
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
dummyallok
"
,
"
type
"
:
"
dummyallok
"
,
"
applicationname
"
:
"
jiotests
"
"
application
_
name
"
:
"
jiotests
"
});
});
o
.
waitUntilAJobExists
(
30000
);
// timeout 30 sec
o
.
waitUntilAJobExists
(
30000
);
// timeout 30 sec
o
.
testLastJobLabel
(
"
put
"
,
"
Job restored
"
);
o
.
testLastJobLabel
(
"
put
"
,
"
Job restored
"
);
...
@@ -758,7 +758,7 @@ test ("Post", function(){
...
@@ -758,7 +758,7 @@ test ("Post", function(){
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
upost
"
,
"
username
"
:
"
upost
"
,
"
applicationname
"
:
"
apost
"
"
application
_
name
"
:
"
apost
"
});
});
// post without id
// post without id
...
@@ -796,7 +796,7 @@ test ("Put", function(){
...
@@ -796,7 +796,7 @@ test ("Put", function(){
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
uput
"
,
"
username
"
:
"
uput
"
,
"
applicationname
"
:
"
aput
"
"
application
_
name
"
:
"
aput
"
});
});
// put without id
// put without id
...
@@ -846,7 +846,7 @@ test ("PutAttachment", function(){
...
@@ -846,7 +846,7 @@ test ("PutAttachment", function(){
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
uputattmt
"
,
"
username
"
:
"
uputattmt
"
,
"
applicationname
"
:
"
aputattmt
"
"
application
_
name
"
:
"
aputattmt
"
});
});
// putAttachment without doc id
// putAttachment without doc id
...
@@ -943,7 +943,7 @@ test ("Get", function(){
...
@@ -943,7 +943,7 @@ test ("Get", function(){
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
uget
"
,
"
username
"
:
"
uget
"
,
"
applicationname
"
:
"
aget
"
"
application
_
name
"
:
"
aget
"
});
});
// get inexistent document
// get inexistent document
...
@@ -1000,7 +1000,7 @@ test ("Remove", function(){
...
@@ -1000,7 +1000,7 @@ test ("Remove", function(){
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
uremove
"
,
"
username
"
:
"
uremove
"
,
"
applicationname
"
:
"
aremove
"
"
application
_
name
"
:
"
aremove
"
});
});
// remove inexistent document
// remove inexistent document
...
@@ -1063,7 +1063,7 @@ test ("AllDocs", function(){
...
@@ -1063,7 +1063,7 @@ test ("AllDocs", function(){
o
.
jio
=
JIO
.
newJio
({
o
.
jio
=
JIO
.
newJio
({
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
ualldocs
"
,
"
username
"
:
"
ualldocs
"
,
"
applicationname
"
:
"
aalldocs
"
"
application
_
name
"
:
"
aalldocs
"
});
});
// alldocs
// alldocs
...
@@ -1087,7 +1087,7 @@ test ("Post", function(){
...
@@ -1087,7 +1087,7 @@ test ("Post", function(){
"
sub_storage
"
:
{
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
urevpost
"
,
"
username
"
:
"
urevpost
"
,
"
applicationname
"
:
"
arevpost
"
"
application
_
name
"
:
"
arevpost
"
}
}
});
});
...
@@ -1159,7 +1159,7 @@ test ("Put", function(){
...
@@ -1159,7 +1159,7 @@ test ("Put", function(){
"
sub_storage
"
:
{
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
urevput
"
,
"
username
"
:
"
urevput
"
,
"
applicationname
"
:
"
arevput
"
"
application
_
name
"
:
"
arevput
"
}
}
});
});
...
@@ -1218,7 +1218,7 @@ test ("Get", function(){
...
@@ -1218,7 +1218,7 @@ test ("Get", function(){
"
sub_storage
"
:
{
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
urevget
"
,
"
username
"
:
"
urevget
"
,
"
applicationname
"
:
"
arevget
"
"
application
_
name
"
:
"
arevget
"
}
}
});
});
o
.
localpath
=
"
jio/localstorage/urevget/arevget
"
;
o
.
localpath
=
"
jio/localstorage/urevget/arevget
"
;
...
@@ -1372,7 +1372,7 @@ test ("Remove", function(){
...
@@ -1372,7 +1372,7 @@ test ("Remove", function(){
"
sub_storage
"
:
{
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
urevrem
"
,
"
username
"
:
"
urevrem
"
,
"
applicationname
"
:
"
arevrem
"
"
application
_
name
"
:
"
arevrem
"
}
}
});
});
o
.
localpath
=
"
jio/localstorage/urevrem/arevrem
"
;
o
.
localpath
=
"
jio/localstorage/urevrem/arevrem
"
;
...
@@ -1575,7 +1575,7 @@ test ("Scenario", function(){
...
@@ -1575,7 +1575,7 @@ test ("Scenario", function(){
"
sub_storage
"
:
{
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
usam1
"
,
"
username
"
:
"
usam1
"
,
"
applicationname
"
:
"
asam1
"
"
application
_
name
"
:
"
asam1
"
}
}
});
});
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
...
@@ -1601,7 +1601,7 @@ test ("Scenario", function(){
...
@@ -1601,7 +1601,7 @@ test ("Scenario", function(){
"
sub_storage
"
:
{
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
usam1
"
,
"
username
"
:
"
usam1
"
,
"
applicationname
"
:
"
asam1
"
"
application
_
name
"
:
"
asam1
"
}
}
});
});
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
...
@@ -1658,7 +1658,7 @@ test ("Scenario", function(){
...
@@ -1658,7 +1658,7 @@ test ("Scenario", function(){
"
sub_storage
"
:
{
"
sub_storage
"
:
{
"
type
"
:
"
local
"
,
"
type
"
:
"
local
"
,
"
username
"
:
"
usam1
"
,
"
username
"
:
"
usam1
"
,
"
applicationname
"
:
"
asam1
"
"
application
_
name
"
:
"
asam1
"
}
}
});
});
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
o
.
localpath
=
"
jio/localstorage/usam1/asam1
"
;
...
@@ -1752,7 +1752,7 @@ test ('Document load', function () {
...
@@ -1752,7 +1752,7 @@ test ('Document load', function () {
o.jio = JIO.newJio({type:'dav',username:'davload',
o.jio = JIO.newJio({type:'dav',username:'davload',
password:'checkpwd',
password:'checkpwd',
url:'https://ca-davstorage:8080',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
// note: http errno:
// note: http errno:
// 200 OK
// 200 OK
// 201 Created
// 201 Created
...
@@ -1817,7 +1817,7 @@ test ('Document save', function () {
...
@@ -1817,7 +1817,7 @@ test ('Document save', function () {
o.jio = JIO.newJio({type:'dav',username:'davsave',
o.jio = JIO.newJio({type:'dav',username:'davsave',
password:'checkpwd',
password:'checkpwd',
url:'https://ca-davstorage:8080',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
// note: http errno:
// note: http errno:
// 200 OK
// 200 OK
// 201 Created
// 201 Created
...
@@ -1884,7 +1884,7 @@ test ('Get Document List', function () {
...
@@ -1884,7 +1884,7 @@ test ('Get Document List', function () {
o.jio = JIO.newJio({type:'dav',username:'davlist',
o.jio = JIO.newJio({type:'dav',username:'davlist',
password:'checkpwd',
password:'checkpwd',
url:'https://ca-davstorage:8080',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
o.mytest('fail to get list',true,undefined,404);
o.mytest('fail to get list',true,undefined,404);
o.mytest('getting list',true,[{
o.mytest('getting list',true,[{
id:'file',key:'file',
id:'file',key:'file',
...
@@ -1949,7 +1949,7 @@ test ('Remove document', function () {
...
@@ -1949,7 +1949,7 @@ test ('Remove document', function () {
o.jio = JIO.newJio({type:'dav',username:'davremove',
o.jio = JIO.newJio({type:'dav',username:'davremove',
password:'checkpwd',
password:'checkpwd',
url:'https://ca-davstorage:8080',
url:'https://ca-davstorage:8080',
applicationname:'jiotests'});
application
_
name:'jiotests'});
o.mytest('remove document',{ok:true,id:'file'},204);
o.mytest('remove document',{ok:true,id:'file'},204);
o.mytest('remove an already removed document',404,404);
o.mytest('remove an already removed document',404,404);
...
@@ -2247,7 +2247,7 @@ test ('Document save' , function () {
...
@@ -2247,7 +2247,7 @@ test ('Document save' , function () {
password:'mypwd',
password:'mypwd',
storage:{type:'local',
storage:{type:'local',
username:'cryptsavelocal',
username:'cryptsavelocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
o.f = function (err,val) {
if (err) {
if (err) {
err = err.status;
err = err.status;
...
@@ -2282,7 +2282,7 @@ test ('Document load' , function () {
...
@@ -2282,7 +2282,7 @@ test ('Document load' , function () {
password:'mypwd',
password:'mypwd',
storage:{type:'local',
storage:{type:'local',
username:'cryptloadlocal',
username:'cryptloadlocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
o.f = function (err,val) {
deepEqual (err || val,{
deepEqual (err || val,{
_id:'testload',content:'contentoftest',
_id:'testload',content:'contentoftest',
...
@@ -2312,7 +2312,7 @@ test ('Get Document List', function () {
...
@@ -2312,7 +2312,7 @@ test ('Get Document List', function () {
password:'mypwd',
password:'mypwd',
storage:{type:'local',
storage:{type:'local',
username:'cryptgetlistlocal',
username:'cryptgetlistlocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
o.f = function (err,val) {
deepEqual (err || objectifyDocumentArray(val.rows),
deepEqual (err || objectifyDocumentArray(val.rows),
objectifyDocumentArray(o.doc_list),'Getting list');
objectifyDocumentArray(o.doc_list),'Getting list');
...
@@ -2367,7 +2367,7 @@ test ('Remove document', function () {
...
@@ -2367,7 +2367,7 @@ test ('Remove document', function () {
password:'mypwd',
password:'mypwd',
storage:{type:'local',
storage:{type:'local',
username:'cryptremovelocal',
username:'cryptremovelocal',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
o.f = function (err,val) {
o.f = function (err,val) {
deepEqual (err || val,{ok:true,id:'file'},'Document remove');
deepEqual (err || val,{ok:true,id:'file'},'Document remove');
};
};
...
@@ -2413,7 +2413,7 @@ test ('Simple methods', function () {
...
@@ -2413,7 +2413,7 @@ test ('Simple methods', function () {
username:'methods',
username:'methods',
storage:{type:'local',
storage:{type:'local',
username:'conflictmethods',
username:'conflictmethods',
applicationname:'jiotests'}});
application
_
name:'jiotests'}});
// PUT
// PUT
o.spy({ok:true,id:'file.doc',rev:'1'},'saving "file.doc".');
o.spy({ok:true,id:'file.doc',rev:'1'},'saving "file.doc".');
o.jio.put({_id:'file.doc',content:'content1'},function (err,val) {
o.jio.put({_id:'file.doc',content:'content1'},function (err,val) {
...
@@ -2588,7 +2588,7 @@ test ('Revision Conflict', function() {
...
@@ -2588,7 +2588,7 @@ test ('Revision Conflict', function() {
};
};
o.sub_storage_spec = {type:'local',
o.sub_storage_spec = {type:'local',
username:'revisionconflict',
username:'revisionconflict',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
storage:o.sub_storage_spec});
...
@@ -2752,7 +2752,7 @@ test ('Conflict in a conflict solving', function () {
...
@@ -2752,7 +2752,7 @@ test ('Conflict in a conflict solving', function () {
};
};
o.sub_storage_spec = {type:'local',
o.sub_storage_spec = {type:'local',
username:'conflictconflict',
username:'conflictconflict',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
storage:o.sub_storage_spec});
...
@@ -2939,7 +2939,7 @@ test ('Remove revision conflict', function () {
...
@@ -2939,7 +2939,7 @@ test ('Remove revision conflict', function () {
};
};
o.sub_storage_spec = {type:'local',
o.sub_storage_spec = {type:'local',
username:'removeconflict',
username:'removeconflict',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
storage:o.sub_storage_spec});
...
@@ -3169,7 +3169,7 @@ test ('Load Revisions', function () {
...
@@ -3169,7 +3169,7 @@ test ('Load Revisions', function () {
o.tick = basic_tick_function;
o.tick = basic_tick_function;
o.sub_storage_spec = {type:'local',
o.sub_storage_spec = {type:'local',
username:'loadrevisions',
username:'loadrevisions',
applicationname:'jiotests'}
application
_
name:'jiotests'}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
o.jio = JIO.newJio({type:'conflictmanager',
storage:o.sub_storage_spec});
storage:o.sub_storage_spec});
...
@@ -3190,7 +3190,7 @@ test ('Get revision List', function () {
...
@@ -3190,7 +3190,7 @@ test ('Get revision List', function () {
o.tick = basic_tick_function;
o.tick = basic_tick_function;
o.sub_storage_spec = {type:'local',
o.sub_storage_spec = {type:'local',
username:'getrevisionlist',
username:'getrevisionlist',
applicationname:'jiotests'}
application
_
name:'jiotests'}
o.rev = {};
o.rev = {};
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
o.jio = JIO.newJio({type:'conflictmanager',
o.jio = JIO.newJio({type:'conflictmanager',
...
...
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