av8or1 commented on code in PR #39840:
URL: https://github.com/apache/arrow/pull/39840#discussion_r1473162106
##########
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:
BTW, the choice to create the RandomFileName() and RandomFileNameExtension()
methods was done in part because I prefer abstractions (generally) and also
because there was a similar abstraction for the container name, which is found
at line 369, thus:
` static std::string RandomContainerName(RNG& rng) { return RandomChars(32,
rng); }
`
And so I decided to follow suit by creating abstractions for file names,
just as there was one for container names. Again, I'll pull those back inline
since that seems to be the preference.
--
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]