From d0d18b2a85b7851aa20e6b429ec20282edf57caa Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Thu, 31 Oct 2019 05:29:25 -0700 Subject: [PATCH] client/allocwatcher: fix dropped test error (#6592) --- client/allocwatcher/alloc_watcher_unix_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/allocwatcher/alloc_watcher_unix_test.go b/client/allocwatcher/alloc_watcher_unix_test.go index 21f95cdf9..aa75ab8ea 100644 --- a/client/allocwatcher/alloc_watcher_unix_test.go +++ b/client/allocwatcher/alloc_watcher_unix_test.go @@ -76,6 +76,10 @@ func TestPrevAlloc_StreamAllocDir_Ok(t *testing.T) { tw := tar.NewWriter(buf) walkFn := func(path string, fileInfo os.FileInfo, err error) error { + // filepath.Walk passes in an error + if err != nil { + return fmt.Errorf("error from filepath.Walk(): %s", err) + } // Include the path of the file name relative to the alloc dir // so that we can put the files in the right directories link := ""