av8or1 commented on code in PR #39840:
URL: https://github.com/apache/arrow/pull/39840#discussion_r1473194895
##########
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:
Alright, now I understand why kou asked why I defined a function in
`TEST_F() {...} `. The short answer is that this was a lack of deletion error
on my part. I had copied the definition of the CreateFile() method temporarily
while I wrote the test to ensure that I got the invocation parms correctly
written. Then I simply forgot to delete the reference. Apologies. I have
deleted that from the most recent version. Good catch, thanks!
--
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]