Skip to content

Commit

Permalink
Remove one of the placeholder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Oct 15, 2023
1 parent 98e019c commit 0c58509
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,33 +124,6 @@ AzuriteEnv* GetAzuriteEnv() {

// Placeholder tests
// TODO: GH-18014 Remove once a proper test is added
TEST(AzureFileSystem, UploadThenDownload) {
const std::string container_name = "sample-container";
const std::string blob_name = "sample-blob.txt";
const std::string blob_content = "Hello Azure!";

const std::string& account_name = GetAzuriteEnv()->account_name();
const std::string& account_key = GetAzuriteEnv()->account_key();

auto credential = std::make_shared<Azure::Storage::StorageSharedKeyCredential>(
account_name, account_key);

auto service_client = Azure::Storage::Blobs::BlobServiceClient(
std::string("http://127.0.0.1:10000/") + account_name, credential);
auto container_client = service_client.GetBlobContainerClient(container_name);
container_client.CreateIfNotExists();
auto blob_client_ = container_client.GetBlockBlobClient(blob_name);

std::vector<uint8_t> buffer(blob_content.begin(), blob_content.end());
blob_client_.UploadFrom(buffer.data(), buffer.size());

std::vector<uint8_t> downloaded_content(blob_content.size());
blob_client_.DownloadTo(downloaded_content.data(), downloaded_content.size());

EXPECT_EQ(std::string(downloaded_content.begin(), downloaded_content.end()),
blob_content);
}

TEST(AzureFileSystem, InitializeCredentials) {
auto default_credential = std::make_shared<Azure::Identity::DefaultAzureCredential>();
auto managed_identity_credential =
Expand Down

0 comments on commit 0c58509

Please sign in to comment.