felipecrv commented on code in PR #36835:
URL: https://github.com/apache/arrow/pull/36835#discussion_r1295168035


##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -105,15 +111,41 @@ AzuriteEnv* GetAzuriteEnv() {
   return ::arrow::internal::checked_cast<AzuriteEnv*>(azurite_env);
 }
 
-// Placeholder tests for file structure
+// Placeholder tests
 // TODO: GH-18014 Remove once a proper test is added
-TEST(AzureFileSystem, InitialiseAzurite) {
+TEST(AzureFileSystem, UploadThenDownload) {
+  const std::string containerName = "sample-container";
+  const std::string blobName = "sample-blob.txt";
+  const std::string blobContent = "Hello Azure!";
+
   const std::string& account_name = GetAzuriteEnv()->account_name();
   const std::string& account_key = GetAzuriteEnv()->account_key();
-  EXPECT_EQ(account_name, "devstoreaccount1");
-  EXPECT_EQ(account_key,
-            "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/"
-            "K1SZFPTOtr/KBHBeksoGMGw==");
+
+  auto credential = 
std::make_shared<Azure::Storage::StorageSharedKeyCredential>(
+      account_name, account_key);
+
+  auto serviceClient = Azure::Storage::Blobs::BlobServiceClient(
+      "http://127.0.0.1:10000/devstoreaccount1";, credential);
+  auto containerClient = serviceClient.GetBlobContainerClient(containerName);
+  containerClient.CreateIfNotExists();
+  auto blobClient = containerClient.GetBlockBlobClient(blobName);

Review Comment:
   Nitpick: follow the `snake_case` convention instead of `camelCase`. This is 
probably invisible to you if you're currently working on a camelCase-language. 
:-)



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