TestFileExist tests if a file specified with `fileName` exist under directory `directoryPath`, on pod `podName` in namespace `namespace`
(namespace, podName, directoryPath, fileName string)
| 255 | // TestFileExist tests if a file specified with `fileName` exist under directory `directoryPath`, on pod `podName` in |
| 256 | // namespace `namespace` |
| 257 | func TestFileExist(namespace, podName, directoryPath, fileName string) bool { |
| 258 | filePath := directoryPath + "/" + fileName |
| 259 | testFileExistCommand := "test -f " + filePath |
| 260 | _, _, err := run.Unchecked(fmt.Sprintf( |
| 261 | "kubectl exec -n %v %v -- %v", |
| 262 | namespace, |
| 263 | podName, |
| 264 | testFileExistCommand)) |
| 265 | |
| 266 | return err == nil |
| 267 | } |
| 268 | |
| 269 | // TestDirectoryEmpty tests if a directory `directoryPath` exists on pod `podName` in namespace `namespace` |
| 270 | func TestDirectoryEmpty(namespace, podName, directoryPath string) bool { |
nothing calls this directly
no test coverage detected