From 26730eb0832288d8312c34055856ddd3aeced255 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 23 Nov 2016 14:42:04 +0100 Subject: [PATCH] lib/model: Fix test that relies on ignore reloading --- lib/model/model_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/model/model_test.go b/lib/model/model_test.go index 1616e85d..b96634b5 100644 --- a/lib/model/model_test.go +++ b/lib/model/model_test.go @@ -1773,6 +1773,8 @@ func TestScanNoDatabaseWrite(t *testing.T) { } defer m.SetIgnores("default", curIgn) m.SetIgnores("default", nil) + fakeTime := time.Now().Add(5 * time.Second) + os.Chtimes("testdata/.stignore", fakeTime, fakeTime) // Scan the folder twice. The second scan should be a no-op database wise @@ -1789,6 +1791,8 @@ func TestScanNoDatabaseWrite(t *testing.T) { // Ignore a file we know exists. It'll be updated in the database. m.SetIgnores("default", []string{"foo"}) + fakeTime = time.Now().Add(10 * time.Second) + os.Chtimes("testdata/.stignore", fakeTime, fakeTime) m.ScanFolder("default") c2 := db.Committed()