Skip to content

Commit

Permalink
Test empty directory on HNS account
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Nov 1, 2023
1 parent b2a3e83 commit 4142733
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ TEST_F(TestAzureHNSFileSystem, GetFileInfoObjectWithNestedStructure) {
.GetBlockBlobClient(std::string(kObjectName) + "0")
.UploadFrom(reinterpret_cast<const uint8_t*>(kLoremIpsum), strlen(kLoremIpsum));

datalake_service_client_->GetFileSystemClient(PreexistingContainerName())
.GetDirectoryClient("test-empty-object-dir")
.Create();

AssertFileInfo(fs_.get(), PreexistingContainerPath() + kObjectName, FileType::File);
AssertFileInfo(fs_.get(), PreexistingContainerPath() + kObjectName + "/",
FileType::NotFound);
Expand All @@ -338,6 +342,11 @@ TEST_F(TestAzureHNSFileSystem, GetFileInfoObjectWithNestedStructure) {
FileType::NotFound);
AssertFileInfo(fs_.get(), PreexistingContainerPath() + "test-object-dir/some_other_di",
FileType::NotFound);

AssertFileInfo(fs_.get(), PreexistingContainerPath() + "test-empty-object-dir",
FileType::Directory);

// TODO: Add an assert that it did not use ListBlobs to detect directories.
}

// TODO: Add ADLS Gen2 directory tests.
Expand Down

0 comments on commit 4142733

Please sign in to comment.