From dd6070431554de0e31822d1ddb1017dd6bde0e8a Mon Sep 17 00:00:00 2001 From: "jerry.adair" Date: Wed, 7 Feb 2024 01:19:32 -0500 Subject: [PATCH] GH-38703: [C++][FS][Azure] Implement DeleteFile() Modified regression test per suggestion --- cpp/src/arrow/filesystem/azurefs_test.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cpp/src/arrow/filesystem/azurefs_test.cc b/cpp/src/arrow/filesystem/azurefs_test.cc index 5fe696a73eedf..305699370370d 100644 --- a/cpp/src/arrow/filesystem/azurefs_test.cc +++ b/cpp/src/arrow/filesystem/azurefs_test.cc @@ -1383,10 +1383,13 @@ TEST_F(TestAzuriteFileSystem, DeleteDirContentsFailureNonexistent) { } TEST_F(TestAzuriteFileSystem, DeleteFileSuccess) { - CreateFile(fs(), "abc", "data"); - arrow::fs::AssertFileInfo(fs(), "abc", FileType::File); - ASSERT_OK(fs()->DeleteFile("abc")); - arrow::fs::AssertFileInfo(fs(), "abc", FileType::NotFound); + const auto container_name = PreexistingData::RandomContainerName(rng_); + ASSERT_OK(fs()->CreateDir(container_name)); + const auto file_name = ConcatAbstractPath(container_name, "abc"); + CreateFile(fs(), file_name, "data"); + arrow::fs::AssertFileInfo(fs(), file_name, FileType::File); + ASSERT_OK(fs()->DeleteFile(file_name)); + arrow::fs::AssertFileInfo(fs(), file_name, FileType::NotFound); } TEST_F(TestAzuriteFileSystem, DeleteFileFailureNonexistent) {