all: A few more interesting linter fixes (#5502)
A couple of minor bugs and simplifications
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user