karrick/godirwalk

Test error due to non-deletable 'noaccess' subdir

chadnetzer opened this issue · 1 comments

Because the 'noaccess' directory has all permissions removed, it can cause a test failures in the scaffolding_test.go teardown() function. In particular, this is occurring on my Mac. But even with Linux, an error will occur if the 'noaccess' directory has any entries in it (since the recursive delete cannot read the directory entries, or write to the non-empty directory to remove the contents).

Here is an example of the test failure messages on MacOs:

--- FAIL: TestReadDirents (0.01s)
    scaffoling_test.go:90: openat noaccess: permission denied

A solution is to set 0700 permissions on the 'noaccess' dir in the teardown function.

This issue was resolved.