refactor
This commit is contained in:
parent
18d05ca635
commit
b5cf2de900
@ -189,23 +189,15 @@ public:
|
||||
static void execute_mount() {
|
||||
auto mount_cmd = "./repertory -dd \"" + config->get_data_directory() +
|
||||
"\"" + " " + utils::string::join(drive_args, ' ');
|
||||
std::cout << "mount command: " << mount_cmd << std::endl;
|
||||
ASSERT_EQ(0, system(mount_cmd.c_str()));
|
||||
std::this_thread::sleep_for(5s);
|
||||
ASSERT_TRUE(utils::file::directory{mount_location}.exists());
|
||||
}
|
||||
|
||||
static void execute_unmount() {
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
auto unmount_cmd = "fusermount3 -u \"" + mount_location + "\"";
|
||||
#else
|
||||
auto unmount_cmd = "fusermount -u \"" + mount_location + "\"";
|
||||
#endif
|
||||
|
||||
auto unmounted{false};
|
||||
for (int i = 0; not unmounted && (i < 50); i++) {
|
||||
std::cout << "unmount command: " << unmount_cmd << std::endl;
|
||||
auto res = system(unmount_cmd.c_str());
|
||||
auto res = fuse_base::unmount(mount_location);
|
||||
unmounted = res == 0;
|
||||
ASSERT_EQ(0, res);
|
||||
if (not unmounted) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user