mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-03 13:00:37 +08:00
remove error for not having an upgrade
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
@ -35,9 +35,6 @@ func migrationsBinName() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RunMigration(newv int) error {
|
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()
|
migrateBin := migrationsBinName()
|
||||||
|
|
||||||
fmt.Println(" => Looking for suitable fs-repo-migrations binary.")
|
fmt.Println(" => Looking for suitable fs-repo-migrations binary.")
|
||||||
|
@ -13,7 +13,7 @@ test_init_ipfs
|
|||||||
test_expect_success "setup mock migrations" '
|
test_expect_success "setup mock migrations" '
|
||||||
mkdir bin &&
|
mkdir bin &&
|
||||||
echo "#!/bin/bash" > bin/fs-repo-migrations &&
|
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 &&
|
chmod +x bin/fs-repo-migrations &&
|
||||||
export PATH="$(pwd)/bin":$PATH
|
export PATH="$(pwd)/bin":$PATH
|
||||||
'
|
'
|
||||||
@ -35,9 +35,8 @@ test_expect_success "ipfs daemon --migrate=true runs migration" '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "output looks good" '
|
test_expect_success "output looks good" '
|
||||||
#grep "Running: " true_out > /dev/null &&
|
grep "Running: " true_out > /dev/null &&
|
||||||
#grep "Success: fs-repo has been migrated to version 4." true_out > /dev/null
|
grep "Success: fs-repo has been migrated to version 5." true_out > /dev/null
|
||||||
grep "No automatic migrations yet" true_out > /dev/null
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success "'ipfs daemon' prompts to auto migrate" '
|
test_expect_success "'ipfs daemon' prompts to auto migrate" '
|
||||||
|
Reference in New Issue
Block a user