Skip to content

Commit

Permalink
GH-38703: [C++][FS][Azure] Implement DeleteFile()
Browse files Browse the repository at this point in the history
Modified regression test per suggestion
  • Loading branch information
av8or1 committed Feb 7, 2024
1 parent 168356e commit dd60704
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dd60704

Please sign in to comment.