felipecrv commented on code in PR #39840:
URL: https://github.com/apache/arrow/pull/39840#discussion_r1474624299
##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -1382,6 +1386,32 @@ TEST_F(TestAzuriteFileSystem,
DeleteDirContentsFailureNonexistent) {
this->TestDeleteDirContentsFailureNonexistent();
}
+TEST_F(AzuriteFileSystemTest, DeleteFileSuccessHaveFile) {
+void CreateFile(FileSystem* fs, const std::string& path, const std::string&
data) {
+ const auto file_name = PreexistingData::RandomFileName() +
+ PreexistingData::RandomFileNameExtension();
+ ASSERT_OK(CreateFile(fs_.get(), file_name, "abc"));
+ arrow::fs::AssertFileInfo(fs_.get(), file_name, FileType::File);
+ ASSERT_OK(fs_->DeleteFile(file_name));
+ arrow::fs::AssertFileInfo(fs_.get(), file_name, FileType::NotFound);
+}
Review Comment:
The reason we create random containers is to not have test runs interfere
with later runs when the tests crash and containers can't be deleted from the
storage account. The blobs inside the containers don't have to be random. Every
test case is creating a new random container that you can freely add named
blobs to.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]