@cryptotaxi247 / kubo / commits / 310c08cf5

Update Version to reflect fsrepo change

License: MIT Signed-off-by: Zander Mackie <zmackie@gmail.com>

Zander Mackie committed Jan 20, 2017 at 17:27 UTC 310c08cf58eef25fbda468fb1db97612b396bef6
1 file changed +6 -3
repo/fsrepo/migrations/mfsr_test.go
+6 -3
@@ -3,6 +3,7 @@ package mfsr
3 import (
4 "io/ioutil"
5 "os"
6 + "strconv"
7 "testing"
8
9 "github.com/ipfs/go-ipfs/thirdparty/assert"
@@ -28,13 +29,15 @@ func TestVersion(t *testing.T) {
29 t.Fatalf("Should throw an `IsNotExist` error when file doesn't exist: %v", err)
30 }
31
31 - rp = testVersionFile("4", t)
32 + fsrepoV := 5
33 +
34 + rp = testVersionFile(strconv.Itoa(fsrepoV), t)
35 _, err = rp.Version()
36 assert.Err(err, t, "Bad VersionFile")
37
35 - assert.Nil(rp.WriteVersion(4), t, "Trouble writing version")
38 + assert.Nil(rp.WriteVersion(fsrepoV), t, "Trouble writing version")
39
37 - assert.Nil(rp.CheckVersion(4), t, "Trouble checking the verion")
40 + assert.Nil(rp.CheckVersion(fsrepoV), t, "Trouble checking the verion")
41
42 assert.Err(rp.CheckVersion(1), t, "Should throw an error for the wrong version.")
43 }