CleanupClusterLogs cleans up the cluster logs of a given namespace
(namespace string, testFailed bool)
| 67 | |
| 68 | // CleanupClusterLogs cleans up the cluster logs of a given namespace |
| 69 | func CleanupClusterLogs(namespace string, testFailed bool) error { |
| 70 | exists, _ := fileutils.FileExists(path.Join(SternLogDirectory, namespace)) |
| 71 | if exists && !testFailed { |
| 72 | if err := fileutils.RemoveDirectory(path.Join(SternLogDirectory, namespace)); err != nil { |
| 73 | return err |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | return nil |
| 78 | } |
| 79 | |
| 80 | // cleanupNamespace does cleanup duty related to the tear-down of a namespace, |
| 81 | // and is intended to be called in a DeferCleanup clause |
no test coverage detected