winfsp unit tests and fixes
This commit is contained in:
parent
d6aace8c51
commit
ff13142093
@ -64,7 +64,11 @@ protected:
|
|||||||
"winfsp_test",
|
"winfsp_test",
|
||||||
std::to_string(static_cast<std::uint8_t>(provider_t::type)),
|
std::to_string(static_cast<std::uint8_t>(provider_t::type)),
|
||||||
});
|
});
|
||||||
mount_location = "U:";
|
|
||||||
|
ASSERT_TRUE(utils::file::directory(test_directory).remove_recursively());
|
||||||
|
|
||||||
|
mount_location = utils::path::combine(test_directory, {"mount"});
|
||||||
|
ASSERT_TRUE(utils::file::directory(mount_location).create_directory());
|
||||||
|
|
||||||
cfg_directory = utils::path::combine(test_directory, {"cfg"});
|
cfg_directory = utils::path::combine(test_directory, {"cfg"});
|
||||||
ASSERT_TRUE(utils::file::directory(cfg_directory).create_directory());
|
ASSERT_TRUE(utils::file::directory(cfg_directory).create_directory());
|
||||||
@ -83,7 +87,6 @@ protected:
|
|||||||
config->set_s3_config(src_cfg.get_s3_config());
|
config->set_s3_config(src_cfg.get_s3_config());
|
||||||
}
|
}
|
||||||
|
|
||||||
comm = std::make_unique<curl_comm>(config->get_s3_config());
|
|
||||||
drive_args = std::vector<std::string>({
|
drive_args = std::vector<std::string>({
|
||||||
"-s3",
|
"-s3",
|
||||||
"-na",
|
"-na",
|
||||||
@ -103,8 +106,6 @@ protected:
|
|||||||
config->set_sia_config(src_cfg.get_sia_config());
|
config->set_sia_config(src_cfg.get_sia_config());
|
||||||
}
|
}
|
||||||
|
|
||||||
comm = std::make_unique<curl_comm>(config->get_host_config());
|
|
||||||
|
|
||||||
drive_args = std::vector<std::string>({
|
drive_args = std::vector<std::string>({
|
||||||
"-na",
|
"-na",
|
||||||
"sia",
|
"sia",
|
||||||
@ -122,10 +123,6 @@ protected:
|
|||||||
// config->set_event_level(event_level::trace);
|
// config->set_event_level(event_level::trace);
|
||||||
// config->set_s3_config(src_cfg.get_s3_config());
|
// config->set_s3_config(src_cfg.get_s3_config());
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
// comm = std::make_unique<curl_comm>(config->get_s3_config());
|
|
||||||
// provider = std::make_unique<s3_provider>(*config, *comm);
|
|
||||||
// drive_args = std::vector<std::string>({"-en"});
|
|
||||||
// } break;
|
// } break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -133,7 +130,6 @@ protected:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
provider = std::make_unique<provider_t>(*config, *comm);
|
|
||||||
drive_args.push_back(mount_location);
|
drive_args.push_back(mount_location);
|
||||||
execute_mount();
|
execute_mount();
|
||||||
}
|
}
|
||||||
@ -199,7 +195,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void execute_mount() {
|
static void execute_mount() {
|
||||||
auto mount_cmd = ".\\repertory.exe -dd \"" + config->get_data_directory() +
|
auto mount_cmd = "start .\\repertory.exe -dd \"" + config->get_data_directory() +
|
||||||
"\"" + " " + utils::string::join(drive_args, ' ');
|
"\"" + " " + utils::string::join(drive_args, ' ');
|
||||||
std::cout << "mount command: " << mount_cmd << std::endl;
|
std::cout << "mount command: " << mount_cmd << std::endl;
|
||||||
ASSERT_EQ(0, system(mount_cmd.c_str()));
|
ASSERT_EQ(0, system(mount_cmd.c_str()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user