Tom-Newton commented on code in PR #38793:
URL: https://github.com/apache/arrow/pull/38793#discussion_r1399116946


##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -507,6 +507,41 @@ TEST_F(AzuriteFileSystemTest, CreateDirUri) {
   ASSERT_RAISES(Invalid, fs_->CreateDir("abfs://" + RandomContainerName(), 
true));
 }
 
+TEST_F(AzuriteFileSystemTest, DeleteContainerDirSuccess) {
+  auto container_name = RandomContainerName();
+  ASSERT_OK(fs_->CreateDir(container_name));
+  ASSERT_OK(fs_->DeleteDir(container_name));
+}
+
+TEST_F(AzuriteFileSystemTest, DeleteDirSuccess) {

Review Comment:
   I think it would be good to add a test case for a non-empty "virtual 
directory" where we expect the contents of the directory to be deleted. 
   
   Would be nice to add a non-empty test case for hierarchical namespace too. 



##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -507,6 +507,41 @@ TEST_F(AzuriteFileSystemTest, CreateDirUri) {
   ASSERT_RAISES(Invalid, fs_->CreateDir("abfs://" + RandomContainerName(), 
true));
 }
 
+TEST_F(AzuriteFileSystemTest, DeleteContainerDirSuccess) {
+  auto container_name = RandomContainerName();
+  ASSERT_OK(fs_->CreateDir(container_name));
+  ASSERT_OK(fs_->DeleteDir(container_name));

Review Comment:
   Should we add a `arrow::fs::AssertFileInfo(fs_.get(), path, 
FileType::NotFound);` at the end? Personally I would probably also add an 
assertion that the container does exist before deleting it. 



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