TestDirectoryEmpty tests if a directory `directoryPath` exists on pod `podName` in namespace `namespace`
(namespace, podName, directoryPath string)
| 268 | |
| 269 | // TestDirectoryEmpty tests if a directory `directoryPath` exists on pod `podName` in namespace `namespace` |
| 270 | func TestDirectoryEmpty(namespace, podName, directoryPath string) bool { |
| 271 | testDirectoryEmptyCommand := "test \"$(ls -A" + directoryPath + ")\"" |
| 272 | _, _, err := run.Unchecked(fmt.Sprintf( |
| 273 | "kubectl exec -n %v %v -- %v", |
| 274 | namespace, |
| 275 | podName, |
| 276 | testDirectoryEmptyCommand)) |
| 277 | |
| 278 | return err == nil |
| 279 | } |
nothing calls this directly
no test coverage detected