@cryptotaxi247 / kubo / commits / 06c013bf6

cleanup and more testing

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Dec 6, 2015 at 11:03 UTC 06c013bf676e3d411a7a5d4dd10c868c67daf3e3
3 files changed +16 -3
core/commands/add.go
+1 -1
@@ -45,7 +45,7 @@ remains to be implemented.
45 Options: []cmds.Option{
46 cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)
47 cmds.BoolOption(quietOptionName, "q", "Write minimal output"),
48 - cmds.BoolOption(silentOptionName, "x", "Write no output"),
48 + cmds.BoolOption(silentOptionName, "Write no output"),
49 cmds.BoolOption(progressOptionName, "p", "Stream progress data"),
50 cmds.BoolOption(trickleOptionName, "t", "Use trickle-dag format for dag generation"),
51 cmds.BoolOption(onlyHashOptionName, "n", "Only chunk and hash - do not write to disk"),
exchange/bitswap/workers.go
+1 -1
@@ -89,7 +89,7 @@ func (bs *Bitswap) provideWorker(px process.Process) {
89 defer cancel()
90
91 if err := bs.network.Provide(ctx, k); err != nil {
92 - //log.Error(err)
92 + log.Error(err)
93 }
94 }
95
test/sharness/t0250-files-api.sh
+14 -1
@@ -317,7 +317,13 @@ test_files_api() {
317 '
318
319 test_expect_success "write 'no-flush' succeeds" '
320 - echo "testing" | ipfs files write -f -e /cats/walrus
320 + echo "testing" | ipfs files write -f=false -e /cats/walrus
321 + '
322 +
323 + test_expect_success "root hash not bubbled up yet" '
324 + test -z "$ONLINE" ||
325 + (ipfs refs local > refsout &&
326 + test_expect_code 1 grep QmcwKfTMCT7AaeiD92hWjnZn9b6eh9NxnhfSzN5x2vnDpt refsout)
327 '
328
329 test_expect_success "changes bubbled up to root on inspection" '
@@ -350,7 +356,14 @@ test_files_api() {
356
357 # test offline and online
358 test_files_api
359 +
360 +test_expect_success "clean up objects from previous test run" '
361 + ipfs repo gc
362 +'
363 +
364 test_launch_ipfs_daemon
365 +
366 +ONLINE=1 # set online flag so tests can easily tell
367 test_files_api
368 test_kill_ipfs_daemon
369 test_done