From 0f03e55cd13ce79284f483e341d6ace21fe4c308 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 15 Nov 2018 17:48:38 +0000 Subject: [PATCH] fstests: ignore main directory creation in TestFsChangeNotify --- fstest/fstests/fstests.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go index b6ad688b7..8222947e4 100644 --- a/fstest/fstests/fstests.go +++ b/fstest/fstests/fstests.go @@ -1005,7 +1005,11 @@ func Run(t *testing.T, opt *Opt) { return } if e == fs.EntryDirectory { - dirChanges = append(dirChanges, x) + if x != "dir" { + // ignore the base directory creation which we sometimes + // catch and sometimes don't + dirChanges = append(dirChanges, x) + } } else if e == fs.EntryObject { objChanges = append(objChanges, x) }