Skip to content

Commit 56d796f

Browse files
committed
Simple test
1 parent 927ff6d commit 56d796f

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

cpp/src/arrow/filesystem/azurefs_test.cc

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
#include <gmock/gmock-matchers.h>
4444
#include <gmock/gmock-more-matchers.h>
4545
#include <gtest/gtest.h>
46-
#include <azure/identity/client_secret_credential.hpp>
47-
#include <azure/identity/default_azure_credential.hpp>
48-
#include <azure/identity/managed_identity_credential.hpp>
4946
#include <azure/storage/blobs.hpp>
5047
#include <azure/storage/common/storage_credential.hpp>
5148
#include <azure/storage/files/datalake.hpp>
@@ -266,17 +263,6 @@ class AzureHierarchicalNSEnv : public AzureEnvImpl<AzureHierarchicalNSEnv> {
266263
bool WithHierarchicalNamespace() const final { return true; }
267264
};
268265

269-
// Placeholder tests
270-
// TODO: GH-18014 Remove once a proper test is added
271-
TEST(AzureFileSystem, InitializeCredentials) {
272-
auto default_credential = std::make_shared<Azure::Identity::DefaultAzureCredential>();
273-
auto managed_identity_credential =
274-
std::make_shared<Azure::Identity::ManagedIdentityCredential>();
275-
auto service_principal_credential =
276-
std::make_shared<Azure::Identity::ClientSecretCredential>("tenant_id", "client_id",
277-
"client_secret");
278-
}
279-
280266
TEST(AzureFileSystem, OptionsCompare) {
281267
AzureOptions options;
282268
EXPECT_TRUE(options.Equals(options));
@@ -808,6 +794,15 @@ TEST_F(TestAzureHierarchicalNSFileSystem, DeleteDirContentsFailureNonexistent) {
808794

809795
// Tests using Azurite (the local Azure emulator)
810796

797+
TEST_F(TestAzuriteFileSystem, InitialiseFilesystemWithDefaultCredential) {
798+
auto data = SetUpPreexistingData();
799+
AzureOptions options;
800+
EXPECT_OK_AND_ASSIGN(auto env, GetAzureEnv());
801+
options.backend = env->backend();
802+
ARROW_EXPECT_OK(options.ConfigureDefaultCredential(env->account_name()));
803+
EXPECT_OK_AND_ASSIGN(auto default_credential_fs, AzureFileSystem::Make(options));
804+
}
805+
811806
TEST_F(TestAzuriteFileSystem, DetectHierarchicalNamespaceFailsWithMissingContainer) {
812807
auto hierarchical_namespace = internal::HierarchicalNamespaceDetector();
813808
ASSERT_OK(hierarchical_namespace.Init(datalake_service_client_.get()));

0 commit comments

Comments
 (0)