| 321 | } |
| 322 | |
| 323 | void GenericFileSystemTest::TestDeleteRootDirContents(FileSystem* fs) { |
| 324 | if (have_flaky_directory_tree_deletion()) GTEST_SKIP() << "Flaky directory deletion"; |
| 325 | |
| 326 | ASSERT_OK(fs->CreateDir("AB/CD")); |
| 327 | CreateFile(fs, "AB/abc", ""); |
| 328 | |
| 329 | auto st = fs->DeleteRootDirContents(); |
| 330 | if (!st.ok()) { |
| 331 | // Not all filesystems support deleting root directory contents |
| 332 | ASSERT_TRUE(st.IsInvalid() || st.IsNotImplemented()); |
| 333 | AssertAllDirs(fs, {"AB", "AB/CD"}); |
| 334 | AssertAllFiles(fs, {"AB/abc"}); |
| 335 | } else { |
| 336 | AssertAllDirs(fs, {}); |
| 337 | AssertAllFiles(fs, {}); |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | void GenericFileSystemTest::TestDeleteFile(FileSystem* fs) { |
| 342 | ASSERT_OK(fs->CreateDir("AB")); |
nothing calls this directly
no test coverage detected