Use RemoveAll to cleanup test directories
Test directories in Airship have subdirectories now, so removing them with os.Remove() will cause tests to fail. This change updates the cleanup logic to use os.RemoveAll() for directories with children. Change-Id: I1e03cd0335fc1a30610e06d50a701db2b1b571c9 Signed-off-by: Drew Walters <andrew.walters@att.com>
This commit is contained in:
parent
90f025e64d
commit
f8a9a471d3
@ -128,7 +128,7 @@ func makeTestDir(t *testing.T) string {
|
||||
}
|
||||
|
||||
func deleteTestDir(t *testing.T, path string) {
|
||||
err := os.Remove(path)
|
||||
err := os.RemoveAll(path)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user