kou commented on code in PR #39263:
URL: https://github.com/apache/arrow/pull/39263#discussion_r1431018421
##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -266,15 +263,12 @@ class AzureHierarchicalNSEnv : public
AzureEnvImpl<AzureHierarchicalNSEnv> {
bool WithHierarchicalNamespace() const final { return true; }
};
-// Placeholder tests
-// TODO: GH-18014 Remove once a proper test is added
-TEST(AzureFileSystem, InitializeCredentials) {
- auto default_credential =
std::make_shared<Azure::Identity::DefaultAzureCredential>();
- auto managed_identity_credential =
- std::make_shared<Azure::Identity::ManagedIdentityCredential>();
- auto service_principal_credential =
- std::make_shared<Azure::Identity::ClientSecretCredential>("tenant_id",
"client_id",
-
"client_secret");
+TEST(AzureFileSystem, InitialiseFilesystemWithDefaultCredential) {
+ AzureOptions options;
+ options.backend = AzureBackend::kAzurite; // Irrelevant for this test
because it
+ // doesn't connect to the server.
+ ARROW_EXPECT_OK(options.ConfigureDefaultCredential("dummy-account-name"));
+ EXPECT_OK_AND_ASSIGN(auto default_credential_fs,
AzureFileSystem::Make(options));
Review Comment:
> Also there are some Auth methods that are not feasible to test. For
example managed identity can only work on Azure VMs and workload identity can
only work in kubernetes.
Oh...
OK. I see.
--
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]