Skip to content

Commit

Permalink
fix tests for changed migrations text
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <[email protected]>
  • Loading branch information
whyrusleeping committed Aug 31, 2016
1 parent 3faa406 commit 021d3c8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/sharness/t0066-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ test_expect_success "manually reset repo version to 3" '
'

test_expect_success "ipfs daemon --migrate=false fails" '
test_expect_code 1 ipfs daemon --migrate=false 2> false_out
test_expect_code 1 ipfs daemon --migrate=false > false_out
'

test_expect_success "output looks good" '
grep "please run the migrations manually" false_out
grep "Please get fs-repo-migrations from https://dist.ipfs.io" false_out
'

test_expect_success "ipfs daemon --migrate=true runs migration" '
test_expect_code 1 ipfs daemon --migrate=true > true_out
'

test_expect_success "output looks good" '
grep "running migration" true_out > /dev/null &&
grep "binary completed successfully" true_out > /dev/null
grep "Running: " true_out > /dev/null &&
grep "Success: fs-repo has been migrated to version 4." true_out > /dev/null
'

test_expect_success "'ipfs daemon' prompts to auto migrate" '
test_expect_code 1 ipfs daemon > daemon_out 2> daemon_err
'

test_expect_success "output looks good" '
grep "Found old repo version" daemon_out > /dev/null &&
grep "Run migrations automatically?" daemon_out > /dev/null &&
grep "please run the migrations manually" daemon_err > /dev/null
grep "Found outdated fs-repo" daemon_out > /dev/null &&
grep "Run migrations now?" daemon_out > /dev/null &&
grep "Please get fs-repo-migrations from https://dist.ipfs.io" daemon_out > /dev/null
'

test_done

0 comments on commit 021d3c8

Please sign in to comment.