From f8a9a471d3095a0757133dcdaccafe5a2915d280 Mon Sep 17 00:00:00 2001 From: Drew Walters Date: Mon, 17 Feb 2020 16:20:31 -0600 Subject: [PATCH] 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 --- pkg/environment/settings_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/environment/settings_test.go b/pkg/environment/settings_test.go index cb6a362d7..9ae2071d9 100644 --- a/pkg/environment/settings_test.go +++ b/pkg/environment/settings_test.go @@ -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) }