slarson / wholebrain

Automatically exported from code.google.com/p/wholebrain
0 stars 0 forks source link

Test upload / update methods to wbc-server from wbc-client #508

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We are unsure how well the upload / update methods from wbc-server are actually 
working right now, since it has been a while since we tried them out.  We need 
to give them a shot.  The summer interns may be able to help us.  Perhaps Jesus 
can help drive this process with the interns.

Original issue reported on code.google.com by stephen....@gmail.com on 12 Jul 2010 at 1:15

GoogleCodeExporter commented 9 years ago
I seem to have added this comment to the wrong issue, so I'm copying it to this 
issue.

I again tested PUT successfully using ...util.ServerTestImport.java.

See the code for the details. Note some data is hard coded. This does not lend 
itself to a build-time unit test because it modifies the database and set of 
data files.

Basically this program PUTs a simple text file.

The test program returns this response info:
Status code: 201
Response   : http://data.wholebraincatalog.org/datawrappers/generic/jbz42
dw location: http://data.wholebraincatalog.org/content/000TestImport.txt, sha1: 
26d82f1931cbdbd83c2a6871b2cecd5cbcc8c26b

I examine the data files directory and the file is in place after the test 
whereas before the test it was not.

I run http://drlittle.ucsd.edu:8182/datawrappers/generic/jbz42 from a browser 
and get this response:
<ns2:DataWrapper Hjid="1152" 
id="http://data.wholebraincatalog.org/datawrappers/generic/jbz42" 
xmlns:ns9="http://morphml.org/channelml/schema" 
xmlns:ns8="http://morphml.org/neuroml/schema" 
xmlns:ns7="http://morphml.org/networkml/schema" 
xmlns:ns6="http://morphml.org/biophysics/schema" 
xmlns:ns5="http://morphml.org/morphml/schema" 
xmlns:ns4="http://morphml.org/metadata/schema" 
xmlns:ns3="http://wholebrainproject.org/wbc/generated/annotation" 
xmlns:ns10="http://wholebrainproject.org/wbc/generated/datawrapper" 
xmlns:ns2="http://wholebrainproject.org/wbc/generated">
<location>http://data.wholebraincatalog.org/content/000TestImport.txt</location>
<sha1>26d82f1931cbdbd83c2a6871b2cecd5cbcc8c26b</sha1>
<type>unknown</type>
</ns2:DataWrapper>
which confirms the new data wrapper.

I run http://drlittle.ucsd.edu:8182/content/000TestImport.txt from a browser 
and get this result:
This is a test file.
which confirms the imported file is in place and its content can be returned.

Note the SHA-1 is computed and stored in the data wrapper as well.

Original comment by davlit0...@gmail.com on 12 Jul 2010 at 6:08