mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-24 11:57:44 +08:00
Update Version to reflect fsrepo change
License: MIT Signed-off-by: Zander Mackie <zmackie@gmail.com>
This commit is contained in:
parent
fef5d5bbbd
commit
310c08cf58
@ -3,6 +3,7 @@ package mfsr
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/go-ipfs/thirdparty/assert"
|
||||
@ -28,13 +29,15 @@ func TestVersion(t *testing.T) {
|
||||
t.Fatalf("Should throw an `IsNotExist` error when file doesn't exist: %v", err)
|
||||
}
|
||||
|
||||
rp = testVersionFile("4", t)
|
||||
fsrepoV := 5
|
||||
|
||||
rp = testVersionFile(strconv.Itoa(fsrepoV), t)
|
||||
_, err = rp.Version()
|
||||
assert.Err(err, t, "Bad VersionFile")
|
||||
|
||||
assert.Nil(rp.WriteVersion(4), t, "Trouble writing version")
|
||||
assert.Nil(rp.WriteVersion(fsrepoV), t, "Trouble writing version")
|
||||
|
||||
assert.Nil(rp.CheckVersion(4), t, "Trouble checking the verion")
|
||||
assert.Nil(rp.CheckVersion(fsrepoV), t, "Trouble checking the verion")
|
||||
|
||||
assert.Err(rp.CheckVersion(1), t, "Should throw an error for the wrong version.")
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user