Commit 40b83ce5 authored by Steven Allen's avatar Steven Allen

fix go-vet errors

parent 2975b378
...@@ -83,13 +83,13 @@ func TestMoveRestart(t *testing.T) { ...@@ -83,13 +83,13 @@ func TestMoveRestart(t *testing.T) {
// try the move it should fail partly through // try the move it should fail partly through
err = flatfs.Move(v1dir, v2dir, nil) err = flatfs.Move(v1dir, v2dir, nil)
if err == nil { if err == nil {
t.Fatalf("Move should have failed.", err) t.Fatal("Move should have failed.", err)
} }
// okay try to undo should be okay // okay try to undo should be okay
err = flatfs.Move(v2dir, v1dir, nil) err = flatfs.Move(v2dir, v1dir, nil)
if err != nil { if err != nil {
t.Fatalf("Could not undo the move.", err) t.Fatal("Could not undo the move.", err)
} }
checkKeys(t, v1dir, keys, blocks) checkKeys(t, v1dir, keys, blocks)
...@@ -100,7 +100,7 @@ func TestMoveRestart(t *testing.T) { ...@@ -100,7 +100,7 @@ func TestMoveRestart(t *testing.T) {
createDatastore(t, v2dir, flatfs.NextToLast(2)) createDatastore(t, v2dir, flatfs.NextToLast(2))
err = flatfs.Move(v1dir, v2dir, nil) err = flatfs.Move(v1dir, v2dir, nil)
if err == nil { if err == nil {
t.Fatalf("Move should have failed.", err) t.Fatal("Move should have failed.", err)
} }
// fix the permission problem // fix the permission problem
...@@ -150,7 +150,7 @@ func TestUpgradeDownload(t *testing.T) { ...@@ -150,7 +150,7 @@ func TestUpgradeDownload(t *testing.T) {
_, err = os.Stat(filepath.Join(tempdir, flatfs.SHARDING_FN)) _, err = os.Stat(filepath.Join(tempdir, flatfs.SHARDING_FN))
if err == nil { if err == nil {
t.Fatalf("%v not in v0 format, SHARDING FILE exists") t.Fatalf("%v not in v0 format, SHARDING FILE exists", tempdir)
} else if !os.IsNotExist(err) { } else if !os.IsNotExist(err) {
t.Fatalf("Stat fail: %v\n", err) t.Fatalf("Stat fail: %v\n", err)
} }
...@@ -172,7 +172,7 @@ func TestDownloadNonPrefix(t *testing.T) { ...@@ -172,7 +172,7 @@ func TestDownloadNonPrefix(t *testing.T) {
err := flatfs.DowngradeV1toV0(tempdir) err := flatfs.DowngradeV1toV0(tempdir)
if err == nil { if err == nil {
t.Fatalf("DowngradeV1toV0 should have failed", err) t.Fatal("DowngradeV1toV0 should have failed", err)
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment