lib/ignore, lib/model: Use an interface to detect file changes, improving tests
This solves the erratic test failures on model.TestIgnores by ensuring that the ignore patterns are reloaded even in the face of unchanged timestamps. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4208
This commit is contained in:
committed by
Audrius Butkevicius
parent
2a38d2a3d2
commit
68c1a0b9b4
@@ -54,7 +54,7 @@ func init() {
|
||||
}
|
||||
|
||||
func TestWalkSub(t *testing.T) {
|
||||
ignores := ignore.New(false)
|
||||
ignores := ignore.New()
|
||||
err := ignores.Load("testdata/.stignore")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -90,7 +90,7 @@ func TestWalkSub(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWalk(t *testing.T) {
|
||||
ignores := ignore.New(false)
|
||||
ignores := ignore.New()
|
||||
err := ignores.Load("testdata/.stignore")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user