Commit Graph

46 Commits

Author SHA1 Message Date
Juan Batiz-Benet
431d6a5a14 added random-files tool for testing
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 03:18:24 -07:00
rht
eb45082103 Add reversible gc test
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-28 09:47:15 +07:00
Henry
1b16712b5a assets: seed gateway index assets on 'ipfs init'
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>

t0080-repo.sh: added gateway assets to pinning tests

License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-04 01:47:07 +02:00
Henry
624c6e8fe5 assets: fix typo
closes #1343

License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-03 10:59:08 +02:00
Henry
5fbf1e7416 assets: switch to go-bindata
License: MIT
Signed-off-by: Henry <cryptix@riseup.net>
2015-07-03 09:52:08 +02:00
Juan Batiz-Benet
f300e97c50 added sharness/t0061-daemon-opts
Test odd daemon options, like:
- unrestricted-api
- disable-transport-encryption (known breakage atm)

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07:00
Christian Couder
0befe2bf88 install-sharness.sh: update sharness
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-13 22:40:34 +02:00
Christian Couder
3101df56fa install-sharness.sh: implement updates
We want to be able to update Sharness to benefit from
new features.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-13 22:36:47 +02:00
Christian Couder
14a3315dc7 sharness/test-lib: use go-sleep to sleep
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-07 10:29:08 +02:00
Christian Couder
59cac0a161 test-lib: use test_seq()
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-03 23:53:24 +02:00
rht
9bdc1d6060 Test repeat in 10 sec: increase check frequency tenfold 2015-06-03 16:49:03 +07:00
Juan Batiz-Benet
c946dbede3 sharness: randomize swarm address too.
This may take care of the daemon clashing on travis.
2015-05-10 08:28:35 -04:00
Etienne Laurin
f168539030 Improve command line parsing 2015-04-27 17:19:38 +00:00
Christian Couder
14cd8634ef test-lib.sh: fix umount calls
As test directories contain a space, we need to
properly quote paths, otherwise we get errors like:

```
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash is not mounted (according to mtab)
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash is not mounted (according to mtab)
```

instead of:

```
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0030-mount.sh/ipfs is not mounted (according to mtab)
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0030-mount.sh/ipns is not mounted (according to mtab)
```

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-04-21 16:18:35 +02:00
Juan Batiz-Benet
cf797d3d02 sharness: only send kill signal once - #1106
sharness should only send the kill signal once, as that is
what a graceful shutdown should do. in the event that doesn't
happen, we should send it again, and then kill -9 to prevent it
lingering and messing with other tests.
2015-04-21 01:15:22 -07:00
Christian Couder
96a22c5bb1 config: change default config dir name to .ipfs
This changes .go-ipfs to .ipfs everywhere.
And by the way this defines a DefaultPathName const
for this name.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-04-20 02:25:41 -07:00
Jeromy
0a6b880bee fix for #1008 and other pinning fixes
This commit adds a new set of sharness tests for pinning, and addresses
bugs that were pointed out by said tests.

test/sharness: added more pinning tests

Pinning is currently broken. See issue #1051. This commit introduces
a few more pinning tests. These are by no means exhaustive, but
definitely surface the present problems going on. I believe these
tests are correct, but not sure. Pushing them as failing so that
pinning is fixed in this PR.

make pinning and merkledag.Get take contexts

improve 'add' commands usage of pinning

FIXUP: fix 'pin lists look good'

ipfs-pin-stat simple script to help check pinning

This is a simple shell script to help check pinning.

We ought to strive towards making adding commands this easy.
The http api is great and powerful, but our setup right now
gets in the way. Perhaps we can clean up that area.

updated t0081-repo-pinning

- fixed a couple bugs with the tests
- made it a bit clearer (still a lot going on)
- the remaining tests are correct and highlight a problem with
  pinning. Namely, that recursive pinning is buggy. At least:
  towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
  be pinned indirectly, but they're not. And thus get gc-ed out.
  There may be other problems too.

cc @whyrusleeping

fix grep params for context deadline check

fix bugs in pin and pin tests

check for block local before checking recursive pin
2015-04-19 23:40:25 -07:00
Etienne Laurin
233c39ff62 publish by path 2015-04-12 21:51:58 +00:00
theswitch
000de03000 Correct port in quick-start examples 2015-04-06 12:39:06 +10:00
Konstantin Koroviev
490c88599d t0030-mount.sh: improve stdout stderr fail tests 2015-03-31 22:55:36 -07:00
Ho-Sheng Hsiao
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07: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
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
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
Jeromy
7bc405d713 update the readme hash in sharness 2015-02-23 13:47:19 -08: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
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
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
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
Juan Batiz-Benet
c372255807 daemon: fix output + time waiting 2015-02-01 04:29:32 -08:00
Juan Batiz-Benet
052c867a70 sharness: output options in verbose mode 2015-01-31 22:55:05 -08:00
Juan Batiz-Benet
f1d34a2a85 test/sharness: fix errors
- core: daemon stdout print to cmd + daemon init checks
- core: fixed bug where the gateway was printed as "API"
- sharness/test-lib: daemon init checks
- sharness/test-lib: portable TCP port check
- sharness/init: fix test bits output
- sharness: use common hashes in one place.
- move t0100-http-gateway -> t0111-gateway-writable
- sharness: test-lib funcs for gateway config
- sharness/t0111-gateway-writable: use sh funcs
- sharness/t0111-gateway-writable: fixes
  - escape all vars (always `cmd "$VAR"` never `cmd $VAR`)
  - use $FILEPATH, not $path
  - last test seems to fail
2015-01-31 22:54:34 -08:00
Mildred Ki'Lya
51af53d8f7 Added Sharness test for HTTP Gateway 2015-01-31 23:36:46 +01:00
Juan Batiz-Benet
73234479fa init docs: go generated welcome dir + files
updated sharness hashes
2015-01-31 07:51:30 -08:00
Juan Batiz-Benet
c283c0a690 test/sharness: allow testing of daemon without FUSE
This commit allows sharness tests to run daemon tests when the FUSE
option is off. Unsure why this was previously included.
2015-01-28 00:36:30 -08:00
Brian Tiger Chow
bbcc259eaf fix(sharness): Initializing daemon... output 2015-01-27 17:04:38 -08:00
Brian Tiger Chow
df9e6ce640 refactor: rename IPFS_DIR -> IPFS_PATH
closes #394 https://github.com/jbenet/go-ipfs/issues/394
2015-01-21 17:09:39 -08:00
Juan Batiz-Benet
ed41ac27fd daemon: refactor common parts of serve funcs 2015-01-12 01:01:21 -08:00
Christian Couder
9e8fc3826a install-sharness.sh: use git instead of wget and shasum
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-01-09 23:13:48 +01:00
Juan Batiz-Benet
cecfa45745 moved sharness tests to a subdir.
kept bin in place
2015-01-07 07:10:17 -08:00