pitrou commented on code in PR #39009:
URL: https://github.com/apache/arrow/pull/39009#discussion_r1415368050


##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -287,6 +287,49 @@ class AzureFileSystemTest : public ::testing::Test {
 
   void RunGetFileInfoObjectWithNestedStructureTest();
   void RunGetFileInfoObjectTest();
+
+  void SetUpSmallFileSystemTree() {
+    // Set up test containers
+    
blob_service_client_->GetBlobContainerClient("empty-container").CreateIfNotExists();
+
+    auto container_client = 
blob_service_client_->GetBlobContainerClient("container");
+    container_client.CreateIfNotExists();
+
+    auto blob_client = container_client.GetBlockBlobClient("emptydir/");
+    blob_client.UploadFrom(reinterpret_cast<const uint8_t*>(""), 0);
+
+    blob_client = 
container_client.GetBlockBlobClient("somedir/subdir/subfile");
+    const char* sub_data = "sub data";
+    blob_client.UploadFrom(reinterpret_cast<const uint8_t*>(sub_data), 
strlen(sub_data));
+
+    blob_client = container_client.GetBlockBlobClient("somefile");
+    const char* some_data = "some data";
+    blob_client.UploadFrom(reinterpret_cast<const uint8_t*>(some_data),
+                           strlen(some_data));
+
+    blob_client = 
container_client.GetBlockBlobClient("otherdir/1/2/3/otherfile");
+    const char* other_data = "other data";
+    blob_client.UploadFrom(reinterpret_cast<const uint8_t*>(other_data),
+                           strlen(other_data));

Review Comment:
   Yeah, the setup code creates the test data bypassing our own abstractions. 
That's by design indeed.



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