diff --git a/core/commands/repo.go b/core/commands/repo.go index 6afd533f4..9eada3125 100644 --- a/core/commands/repo.go +++ b/core/commands/repo.go @@ -271,6 +271,7 @@ var repoVerifyCmd = &cmds.Command{ res.SetOutput((<-chan interface{})(out)) }, + Type: VerifyProgress{}, Marshalers: cmds.MarshalerMap{ cmds.Text: func(res cmds.Response) (io.Reader, error) { out := res.Output().(<-chan interface{}) diff --git a/test/sharness/t0084-repo-read-rehash.sh b/test/sharness/t0084-repo-read-rehash.sh index a4831f0f0..9be2e95cf 100755 --- a/test/sharness/t0084-repo-read-rehash.sh +++ b/test/sharness/t0084-repo-read-rehash.sh @@ -29,14 +29,22 @@ test_expect_success 'blocks are swapped' ' ipfs config --bool Datastore.HashOnRead true -test_expect_success 'getting modified block fails' ' - (test_must_fail ipfs cat $H_BLOCK2 2> err_msg) && - grep "block in storage has different hash than requested" err_msg -' +test_check_bad_blocks() { + test_expect_success 'getting modified block fails' ' + (test_must_fail ipfs cat $H_BLOCK2 2> err_msg) && + grep "block in storage has different hash than requested" err_msg + ' -test_expect_success "block shows up in repo verify" ' - test_expect_code 1 ipfs repo verify > verify_out && - grep "$H_BLOCK2" verify_out -' + test_expect_success "block shows up in repo verify" ' + test_expect_code 1 ipfs repo verify > verify_out && + grep "$H_BLOCK2" verify_out + ' +} + +test_check_bad_blocks + +test_launch_ipfs_daemon +test_check_bad_blocks +test_kill_ipfs_daemon test_done