Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aurel
jio
Commits
93888b58
Commit
93888b58
authored
Oct 17, 2013
by
Jonathan Rivalan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validation for get test
parent
713a80e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
src/jio.storage/s3storage.js
src/jio.storage/s3storage.js
+10
-5
test/jio.storage/s3storage.tests.js
test/jio.storage/s3storage.tests.js
+1
-1
No files found.
src/jio.storage/s3storage.js
View file @
93888b58
...
...
@@ -312,11 +312,14 @@
break
;
case
'
GET
'
:
if
(
jio
===
true
)
{
if
(
typeof
this
.
responseText
!==
'
string
'
)
{
console
.
log
(
http
);
console
.
log
(
obj
);
console
.
log
(
typeof
this
.
responseText
);
if
(
typeof
this
.
responseText
===
'
string
'
)
{
response
=
JSON
.
parse
(
this
.
responseText
);
response
.
_attachments
=
response
.
_attachments
||
{};
delete
response
.
_attachments
;
//command.success(JSON.stringify(response)
);
//
response._attachments = response._attachments || {};
//
delete response._attachments;
command
.
success
(
this
.
status
,{
'
data
'
:
response
}
);
}
else
{
if
(
isAttachment
===
true
)
{
//command.success(this.responseText);
...
...
@@ -618,10 +621,11 @@
**/
that
.
put
=
function
(
command
,
metadata
,
options
)
{
var
doc
,
docId
,
mime
;
var
doc
,
docId
,
mime
,
created
;
doc
=
metadata
;
docId
=
doc
.
_id
;
mime
=
'
text/plain; charset=UTF-8
'
;
created
=
false
;
//pas d'attachment dans un put simple
function
putDocument
()
{
var
attachId
,
data
,
isJIO
;
...
...
@@ -645,6 +649,7 @@
doc
.
_attachments
=
response
.
_attachments
;
}
putDocument
();
//TODO : control non existing document to throw a 201 http code
}
);
};
...
...
test/jio.storage/s3storage.tests.js
View file @
93888b58
...
...
@@ -936,7 +936,7 @@
// put 201
putNewDocument
().
then
(
putNewDocumentTest
).
// get 200
//
then(getCreatedDocument2).then(getCreatedDocument2Test).
then
(
getCreatedDocument2
).
then
(
getCreatedDocument2Test
).
// post 409
//then(postSameDocument).then(postSameDocumentTest).
// putA a 204
...
...
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