|
43 | 43 | #include <gmock/gmock-matchers.h> |
44 | 44 | #include <gmock/gmock-more-matchers.h> |
45 | 45 | #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> |
49 | 46 | #include <azure/storage/blobs.hpp> |
50 | 47 | #include <azure/storage/common/storage_credential.hpp> |
51 | 48 | #include <azure/storage/files/datalake.hpp> |
@@ -266,17 +263,6 @@ class AzureHierarchicalNSEnv : public AzureEnvImpl<AzureHierarchicalNSEnv> { |
266 | 263 | bool WithHierarchicalNamespace() const final { return true; } |
267 | 264 | }; |
268 | 265 |
|
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 | | - |
280 | 266 | TEST(AzureFileSystem, OptionsCompare) { |
281 | 267 | AzureOptions options; |
282 | 268 | EXPECT_TRUE(options.Equals(options)); |
@@ -808,6 +794,15 @@ TEST_F(TestAzureHierarchicalNSFileSystem, DeleteDirContentsFailureNonexistent) { |
808 | 794 |
|
809 | 795 | // Tests using Azurite (the local Azure emulator) |
810 | 796 |
|
| 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 | + |
811 | 806 | TEST_F(TestAzuriteFileSystem, DetectHierarchicalNamespaceFailsWithMissingContainer) { |
812 | 807 | auto hierarchical_namespace = internal::HierarchicalNamespaceDetector(); |
813 | 808 | ASSERT_OK(hierarchical_namespace.Init(datalake_service_client_.get())); |
|
0 commit comments