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:
Jakob Borg authored and Audrius Butkevicius committed 2017-06-11 10:27:12 +00:00
1 parent 2a38d2a3d2
commit 68c1a0b9b4
7 files changed
+195 -87

No files matched your search

+2 -2
View File
@@ -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)