improve efficiency of multilayered indirect blocks
clean up tests
panic cleanup
clean up logic, improve readability
add final root node to the dagservice upon creation
importer: simplified dag generation
test: updated hashes using latest code
@whyrusleeping this is why the sharness tests
were failing: the hashes are added manually to
make sure our generation doesn't change.
cleanup after CR
fix merkledag tests
fix small block generation (no subblocks!)
Make sharness tests' output helpful when verbose.
This means cating certain files, or running diagnostic
commands. I used a construction like:
test_expect_success ".go-ipfs/ has been created" '
test -d ".go-ipfs" &&
test -f ".go-ipfs/config" &&
test -d ".go-ipfs/datastore" ||
fsh ls -al .go-ipfs
'
The `|| ...` is a diagnostic run when the preceding command
fails. `fsh` is a trivial script that echoes the args, runs
the cmd, and then also fails, making sure the test case fails.
(wouldnt want the diagnostic accidentally returning true and
making it _seem_ like the test case succeeded).
These new tests are not marked EXPENSIVE as they
should be fast enough even on Travis CI.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
this is a hack around travis key-gen being really slow.
One option would be to add the --key-bits option to daemon
as well. Another option would be to find a better way to
wait for the output, rather than waiting n seconds.
cc @chriscool thoughts?
The ouput from "ipfs help" changed in ipfs2.
With the change in this commit, this output change doesn't
prevent the test to pass.
Test t0010 now passes on my Linux machine.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
The ouput from "ipfs block" changed in ipfs2.
With the change in this commit, this output change doesn't
prevent the test to pass.
Test t0050 now passes on my Linux machine.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
The ouput from "ipfs add" changed in ipfs2.
With the changes in this commit, this output change doesn't
prevent the test to pass.
With TEST_NO_FUSE=1 test t0040 now passes on my Linux machine.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@jbenet @chriscool
(not to be merged into master) This is a hack to run sharness tests on
th ipfs2 binary. Instead of compiling cmd/ipfs, it compiles cmd/ipfs2
and copies this into test/bin/ipfs.
I thought this would be enough to pass the `basic-commands` test, but
it's not.
Although the output is fairly similar, the `ipfs version` test fails.
```
test (feat/test2) λ. diff version1 version2
1c1
< ipfs version 0.1.7
---
> ipfs version 0.1.5
```
I'm not very experienced with `sh` scripting, so perhaps I'm missing a
key ingredient or maybe misunderstanding the the tests are meant to
work.
Would like to get input on this.
Thanks, @maybebtc
This adds test_launch_ipfs_mount() and test_kill_ipfs_mount()
to avoid duplicating tests to launch "ipfs mount" and to
kill it.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
You can use it like this to launch all the
test scripts in order:
$ cd test
$ make
rm -r test-results
*** t0010-basic-commands.sh ***
ok 1 - current dir is writable
ok 2 - ipfs version succeeds
ok 3 - ipfs version output looks good
ok 4 - ipfs help succeeds
ok 5 - ipfs help output looks good
# passed all 5 test(s)
1..5
./test-aggregate-results.sh
fixed 0
success 5
failed 0
broken 0
total 5
Or you can just run one test like this:
$ make t0010-basic-commands.sh
*** t0010-basic-commands.sh ***
ok 1 - current dir is writable
ok 2 - ipfs version succeeds
ok 3 - ipfs version output looks good
ok 4 - ipfs help succeeds
ok 5 - ipfs help output looks good
# passed all 5 test(s)
1..5
This checks a little bit the installation and some
basic commands.
You can run it like that:
$ cd test
$ ./t0010-basic-commands.sh
ok 1 - current dir is writable
ok 2 - ipfs version succeeds
ok 3 - ipfs version output looks good
ok 4 - ipfs help succeeds
ok 5 - ipfs help output looks good
# passed all 5 test(s)
1..5