Skip to content

Commit

Permalink
More complete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Feb 18, 2024
1 parent ff72cdf commit 8f573cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -830,12 +830,14 @@ class TestAzureFileSystem : public ::testing::Test {
auto data = SetUpPreexistingData();
auto directory_path = data.Path("directory");

auto directory_path_with_slash = directory_path + "/";
ASSERT_OK(fs()->CreateDir(directory_path));
ASSERT_RAISES(IOError, fs()->OpenInputFile(directory_path));
ASSERT_RAISES(IOError, fs()->OpenOutputStream(directory_path));
ASSERT_RAISES(IOError, fs()->OpenAppendStream(directory_path));

auto directory_path_with_slash = directory_path + "/";
ASSERT_RAISES(IOError, fs()->OpenInputFile(directory_path_with_slash));
ASSERT_RAISES(IOError, fs()->OpenOutputStream(directory_path_with_slash));
ASSERT_RAISES(IOError, fs()->OpenAppendStream(directory_path_with_slash));
}

Expand All @@ -845,10 +847,12 @@ class TestAzureFileSystem : public ::testing::Test {
ASSERT_OK(fs()->CreateDir(path1));
ASSERT_RAISES(IOError, fs()->OpenOutputStream(path1));
ASSERT_RAISES(IOError, fs()->OpenAppendStream(path1));
AssertFileInfo(fs(), path1, FileType::Directory);

auto path2 = data.Path("directory2");
ASSERT_OK(fs()->OpenOutputStream(path2));
ASSERT_RAISES(IOError, fs()->CreateDir(path2));
AssertFileInfo(fs(), path2, FileType::File);
}

void TestDeleteDirSuccessEmpty() {
Expand Down

0 comments on commit 8f573cb

Please sign in to comment.