Skip to content

Commit

Permalink
Simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Dec 17, 2023
1 parent 927ff6d commit 56d796f
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
#include <gmock/gmock-matchers.h>
#include <gmock/gmock-more-matchers.h>
#include <gtest/gtest.h>
#include <azure/identity/client_secret_credential.hpp>
#include <azure/identity/default_azure_credential.hpp>
#include <azure/identity/managed_identity_credential.hpp>
#include <azure/storage/blobs.hpp>
#include <azure/storage/common/storage_credential.hpp>
#include <azure/storage/files/datalake.hpp>
Expand Down Expand Up @@ -266,17 +263,6 @@ 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, OptionsCompare) {
AzureOptions options;
EXPECT_TRUE(options.Equals(options));
Expand Down Expand Up @@ -808,6 +794,15 @@ TEST_F(TestAzureHierarchicalNSFileSystem, DeleteDirContentsFailureNonexistent) {

// Tests using Azurite (the local Azure emulator)

TEST_F(TestAzuriteFileSystem, InitialiseFilesystemWithDefaultCredential) {
auto data = SetUpPreexistingData();
AzureOptions options;
EXPECT_OK_AND_ASSIGN(auto env, GetAzureEnv());
options.backend = env->backend();
ARROW_EXPECT_OK(options.ConfigureDefaultCredential(env->account_name()));
EXPECT_OK_AND_ASSIGN(auto default_credential_fs, AzureFileSystem::Make(options));
}

TEST_F(TestAzuriteFileSystem, DetectHierarchicalNamespaceFailsWithMissingContainer) {
auto hierarchical_namespace = internal::HierarchicalNamespaceDetector();
ASSERT_OK(hierarchical_namespace.Init(datalake_service_client_.get()));
Expand Down

0 comments on commit 56d796f

Please sign in to comment.