test helpers: add RemoveAll and ResetReadOnly

This is mainly needed in Windows, where files and dirs cannot be
removed unless they are writeable.
This commit is contained in:
Alexander Neumann
2015-08-18 21:05:49 +02:00
parent 36ed3add3a
commit 1a47ea4ab8
5 changed files with 36 additions and 7 deletions

View File

@@ -109,7 +109,7 @@ func TestNodeRestoreAt(t *testing.T) {
defer func() {
if TestCleanup {
OK(t, os.RemoveAll(tempdir))
RemoveAll(t, tempdir)
} else {
t.Logf("leaving tempdir at %v", tempdir)
}