1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 18:13:54 +08:00

remove error for not having an upgrade

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy
2017-01-25 23:17:31 -08:00
parent a54ab23371
commit f28ba8559b
2 changed files with 3 additions and 7 deletions

View File

@ -35,9 +35,6 @@ func migrationsBinName() string {
}
func RunMigration(newv int) error {
if newv == 5 {
return fmt.Errorf("No automatic migrations yet for repo version 5. You will have to build them from source.\nSee https://github.com/ipfs/fs-repo-migrations")
}
migrateBin := migrationsBinName()
fmt.Println(" => Looking for suitable fs-repo-migrations binary.")

View File

@ -13,7 +13,7 @@ test_init_ipfs
test_expect_success "setup mock migrations" '
mkdir bin &&
echo "#!/bin/bash" > bin/fs-repo-migrations &&
echo "echo 4" >> bin/fs-repo-migrations &&
echo "echo 5" >> bin/fs-repo-migrations &&
chmod +x bin/fs-repo-migrations &&
export PATH="$(pwd)/bin":$PATH
'
@ -35,9 +35,8 @@ test_expect_success "ipfs daemon --migrate=true runs migration" '
'
test_expect_success "output looks good" '
#grep "Running: " true_out > /dev/null &&
#grep "Success: fs-repo has been migrated to version 4." true_out > /dev/null
grep "No automatic migrations yet" true_out > /dev/null
grep "Running: " true_out > /dev/null &&
grep "Success: fs-repo has been migrated to version 5." true_out > /dev/null
'
test_expect_success "'ipfs daemon' prompts to auto migrate" '