all: A few more interesting linter fixes (#5502)

A couple of minor bugs and simplifications
This commit is contained in:
Jakob Borg
2019-02-02 12:09:07 +01:00
committed by GitHub
parent 0b2cabbc31
commit 9fd270d78e
20 changed files with 55 additions and 68 deletions

View File

@@ -471,7 +471,6 @@ func TestIssue4841(t *testing.T) {
t.Fatalf(`Sent index with file %v, should be "foo"`, fs[0].Name)
}
received <- fs[0]
return
}
fc.mut.Unlock()
@@ -521,7 +520,6 @@ func TestRescanIfHaveInvalidContent(t *testing.T) {
t.Fatalf(`Sent index with file %v, should be "foo"`, fs[0].Name)
}
received <- fs[0]
return
}
fc.mut.Unlock()
@@ -551,7 +549,7 @@ func TestRescanIfHaveInvalidContent(t *testing.T) {
t.Fatal(err)
}
res, err = m.Request(device2, "default", "foo", int32(len(payload)), 0, f.Blocks[0].Hash, f.Blocks[0].WeakHash, false)
_, err = m.Request(device2, "default", "foo", int32(len(payload)), 0, f.Blocks[0].Hash, f.Blocks[0].WeakHash, false)
if err == nil {
t.Fatalf("expected failure")
}
@@ -586,7 +584,6 @@ func TestParentDeletion(t *testing.T) {
fc.mut.Lock()
fc.indexFn = func(folder string, fs []protocol.FileInfo) {
received <- fs
return
}
fc.mut.Unlock()
fc.sendIndexUpdate()