Christian Couder
ef85f67610
t0051: fix indentation
...
Fix indentation and use > instead of >> to create
an expected file.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-15 17:00:09 +01:00
Juan Batiz-Benet
90d2113f99
Merge pull request #896 from jbenet/t0060_reactivate_daemon_tests
...
t0060: reactivate daemon tests
2015-03-10 15:55:52 -07:00
Henry
b688e72de0
ipfs object put: return error if object is empty ( fixes #883 )
2015-03-10 22:58:50 +01:00
Juan Batiz-Benet
e06016116d
Merge pull request #895 from jbenet/sharness_check_curl_response
...
sharness: add function to test curl response
2015-03-10 08:39:55 -07:00
Christian Couder
37bfef884c
t0060: reactivate daemon tests
...
Tests in this script had been deactivated because
there was no good way to wait until the daemon was
ready. Now that we can use pollEndpoint for that
it's time to reactivate the tests.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-10 15:02:19 +01:00
Christian Couder
c39b5a7430
sharness: add function to test curl response
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-10 14:56:09 +01:00
Christian Couder
f67522e3f3
sharness/README: add writing tests and debugging
...
Add information from the discussion of PR #891 .
While at it, suggest using -v and -i options to debug one test.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-10 14:51:44 +01:00
Christian Couder
60081ebc3b
t0110: replace wget with curl
...
This removes the dependency on wget, and, while at it, cleanups a bit.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-08 08:35:44 +01:00
Christian Couder
e1a33a0e92
t0045: style cleanup and add missing &&
...
This makes the following changes:
- remove some superfluous \ at the end of some lines
- use `cat <<-\EOF >expected` to ignore the starting tabs
in the here document
- add missing && after some `cat`
- use test_cmp to compare files
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-07 20:26:45 +01:00
Henry
2a0cd6d3d3
object: added sharness tests for get, put and stat
2015-03-07 16:50:30 +01:00
Christian Couder
b01e535115
t0110: cleanup using expr
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-04 21:02:32 +01:00
Juan Batiz-Benet
04a3a66c6c
sharness/testlib: seed RANDOM
...
this is ugly. ideally would seed using date, but unclear
what a portable datetime is. date '+%s' doesnt work on osx.
2015-03-04 08:17:55 -08:00
Juan Batiz-Benet
0510633a17
tests/sharness: t0111-gateway-writable
...
ideally this port would be a randomly picked unused port.
for now we just pick a different port than t0110-gateway.
2015-03-04 08:17:54 -08:00
Juan Batiz-Benet
2a40d7679e
test/sharness: randomize api port workaround
...
we have a problem where initializing daemons with the same api port
often fails-- it hangs indefinitely. The proper solution is to make
ipfs pick an unused port for the api on startup, and then use that.
Unfortunately, ipfs doesnt yet know how to do this-- the api port
must be specified. Until ipfs learns how to do this, we must use
specific port numbers, which may still fail but less frequently
if we at least use different ones.
2015-03-04 07:34:05 -08:00
Juan Batiz-Benet
999471d9bf
test/sharness/t004-add-cat: quote hashes
2015-03-04 07:34:05 -08:00
Henry
aa745fef07
specify new dep in sharenss Makefile
2015-03-04 15:06:26 +01:00
Henry
0204a0c174
cat log output on fail
2015-03-04 14:53:30 +01:00
Henry
56a32a306c
using pollEndpoint to block in tests for 'daemon ready' (updates #844 )
2015-03-04 14:50:17 +01:00
Juan Batiz-Benet
9f27556090
Merge pull request #823 from BrendanBenshoof/master
...
fixing bug 812
2015-03-02 17:02:24 -08:00
bbenshoof
ed179263f4
split the tests
2015-03-02 17:55:01 -05:00
Juan Batiz-Benet
8ec5182186
Merge pull request #838 from jbenet/t0111_fix_double_quoting
...
t0111: fix broken test due to bad double quoting
2015-03-02 14:35:14 -08:00
bbenshoof
ac5cfc5664
fixing bug 812
2015-03-02 17:07:21 -05:00
Henry
220aaf2802
sharness: don't be to smart about creating testData
2015-03-01 14:03:51 +01:00
Henry
9cf718932e
ipfs ls: make sure to fully create testData
2015-03-01 14:03:51 +01:00
Henry
f5f5d5d9d2
newIpfsLs: add shareness test
2015-03-01 14:03:51 +01:00
Christian Couder
17ca4f6429
t0111: use expr again to check location
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 18:27:54 +01:00
Christian Couder
f82526a5ca
t0111: use URL variable to clarify code
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 08:21:55 +01:00
Christian Couder
d9d758cfde
t0111: use "expr" more to check Location
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 08:14:15 +01:00
Christian Couder
158affac99
t0111: use "expr" to check Location
...
This makes it possible to simplify the code.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 08:06:04 +01:00
Christian Couder
c844fffef2
t0111: fix broken test due to bad double quoting
...
There was basically:
curl ... "$URL 2>curl.out"
instead of:
curl ... "$URL" 2>curl.out
So "curl.out" was not properly overwritten by the curl command.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-27 22:09:11 +01:00
Jeromy
7bc405d713
update the readme hash in sharness
2015-02-23 13:47:19 -08:00
Christian Couder
391b5a3c89
t0040: use multihash instead of shasum in tests
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-08 13:36:37 +01:00
Christian Couder
fe1ba2bf18
test: use multihash instead of shasum in tests
...
As shasum is not installed on all machines and
we use multihash anyway in the code base, it
removes one dependency to use shasum instead of
shasum in the tests.
Now that there are sharness tests in multihash
it is also safe to use it.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-08 13:35:45 +01:00
Juan Batiz-Benet
0de13b071d
Merge pull request #743 from jbenet/misc-2-2
...
Gateway Changes
2015-02-05 00:05:43 -08:00
Matt Bell
09e4224aa7
test/sharness: Fixed gateway tests
2015-02-04 18:46:59 -08:00
Christian Couder
fa13afa5ca
Replace fsh with test_fsh in sharness tests
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-04 21:53:19 +01:00
Christian Couder
65cbbdff84
Add ipfs-test-lib.sh and source it in sharness test-lib.sh
...
The new ipfs-test-lib.sh file contains generic test
functions.
We also start replacing fsh with a shell function named
test_fsh() in ipfs-test-lib.sh.
And we move our custom test_cmp in ipfs-test-lib.sh.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-04 21:50:07 +01:00
Juan Batiz-Benet
756382a6c3
sharness/test-lib: wait longer for daemon
...
it keeps failing early.
2015-02-02 21:05:32 -08:00
Christian Couder
752f54e313
sharness/test-lib: remove some "cat" followed by |
...
The pattern "cat FILE | COMMAND" can be simplified
to just "COMMAND FILE" when COMMAND accepts files as
arguments.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-03 04:46:35 +01:00
Matt Bell
48885377fc
test/sharness: rm quotes
2015-02-02 10:13:46 -08:00
Matt Bell
54fef5ea96
test/sharness: Added tests for 'ipfs add -w'
2015-02-02 10:07:36 -08:00
Juan Batiz-Benet
b2da275475
sharness/lib: fix daemon startup check
...
Go back to test_run_repeat_10_sec to make sure the API
is there. I think this is also clearer on the reader.
2015-02-01 21:23:31 -08:00
Christian Couder
ce10f20ca7
test/sharness: improve t0111 using test_cmp
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-01 20:46:28 -08:00
Juan Batiz-Benet
1d9d13e286
Merge pull request #720 from jbenet/fix-sharness-gateway-addr-check
...
sharness/lib: fixing gateway addr check
2015-02-01 20:45:58 -08:00
Juan Batiz-Benet
7ce3c79519
sharness/lib: fixing gateway addr check
...
seems that the previous way isnt liked by all platforms
2015-02-01 20:41:34 -08:00
Christian Couder
5aeadd44ad
test/sharness: improve t0090 by using printf
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-01 20:25:24 -08:00
Juan Batiz-Benet
5b0a544b92
sharness/t0090-get.sh disable the failing tar test
2015-02-01 20:16:56 -08:00
Juan Batiz-Benet
33144f4e39
sharness/t0021-config.sh test config setting
2015-02-01 20:15:51 -08:00
Juan Batiz-Benet
24f0d020e0
sharness: better config setting
2015-02-01 20:15:50 -08:00
Juan Batiz-Benet
56b6a2069a
sharness: gateway fixes
...
there's an odd error setting the config.
2015-02-01 19:24:36 -08:00