Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: Dejun Xia <[email protected]>
  • Loading branch information
nshangyiming committed Sep 19, 2024
1 parent bb2448a commit ba1390e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions be/test/fs/fs_posix_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <gtest/gtest.h>

#include <algorithm>
#include <filesystem>

#include "common/logging.h"
#include "fs/encrypt_file.h"
Expand Down Expand Up @@ -313,13 +314,13 @@ TEST_F(PosixFileSystemTest, create_dir_recursive) {
ASSERT_TRUE(FileSystem::Default()->is_directory("./ut_dir/fs_posix/a/b/c/d").value());

// Create soft link ./ut_dir/fs_posix/soft_link_to_d -> ./ut_dir/fs_posix/a/b/c/d.
FileSystem::Default()->create_directory_symlink("./ut_dir/fs_posix/a/b/c/d", "./ut_dir/fs_posix/soft_link_to_d");
std::filesystem::create_directory_symlink("./ut_dir/fs_posix/a/b/c/d", "./ut_dir/fs_posix/soft_link_to_d");
ASSERT_OK(FileSystem::Default()->create_dir_recursive("./ut_dir/fs_posix/soft_link_to_d"));

// Clean.
ASSERT_OK(FileSystem::Default()->delete_dir_recursive(dir_path));
ASSERT_TRUE(FileSystem::Default()->path_exists(dir_path).is_not_found());
ASSERT_TRUE(FileSystem::Default()->remove("./ut_dir/fs_posix/soft_link_to_d"));
ASSERT_TRUE(std::filesystem::remove("./ut_dir/fs_posix/soft_link_to_d"));
}

TEST_F(PosixFileSystemTest, iterate_dir2) {
Expand Down

0 comments on commit ba1390e

Please sign in to comment.