av8or1 commented on code in PR #39840:
URL: https://github.com/apache/arrow/pull/39840#discussion_r1474080829


##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -1382,6 +1386,29 @@ TEST_F(TestAzuriteFileSystem, 
DeleteDirContentsFailureNonexistent) {
   this->TestDeleteDirContentsFailureNonexistent();
 }
 
+TEST_F(TestAzuriteFileSystem, DeleteFileSuccessHaveFile) {
+  const auto blob_name = PreexistingData::RandomBlobName(rng_);
+  ASSERT_OK(CreateFile(fs(), blob_name, "abc"));
+  arrow::fs::AssertFileInfo(fs(), blob_name, FileType::File);
+  ASSERT_OK(fs()->DeleteFile(blob_name));
+  arrow::fs::AssertFileInfo(fs(), blob_name, FileType::NotFound);
+}
+
+TEST_F(TestAzuriteFileSystem, DeleteFileSuccessNonexistent) {
+  const auto blob_name = PreexistingData::RandomBlobName(rng_);
+  arrow::fs::AssertFileInfo(fs(), blob_name, FileType::NotFound);
+  ASSERT_RAISES(IOError, fs()->DeleteFile(blob_name));
+}
+
+TEST_F(TestAzuriteFileSystem, DeleteFileSuccessNotAFile) {
+  const auto container_name = PreexistingData::RandomContainerName(rng_);
+  ASSERT_OK(fs()->CreateDir(container_name));
+  arrow::fs::AssertFileInfo(fs(), container_name, FileType::Directory);
+  ASSERT_RAISES(IOError, fs()->DeleteFile(container_name));
+  ASSERT_OK(fs()->DeleteDir(container_name));
+  arrow::fs::AssertFileInfo(fs(), container_name, FileType::NotFound);

Review Comment:
   Alright, I've deleted those two lines as well.  I've also updated that 
modification to the latest commit proposal.



-- 
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]

Reply via email to