refactor
This commit is contained in:
parent
1b4c1db44d
commit
315db0b662
@ -31,26 +31,26 @@ private:
|
|||||||
static stop_type stop_requested;
|
static stop_type stop_requested;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] static auto
|
[[nodiscard]] static auto default_agent_name(const provider_type &prov)
|
||||||
default_agent_name(const provider_type &prov) -> std::string;
|
-> std::string;
|
||||||
|
|
||||||
[[nodiscard]] static auto
|
[[nodiscard]] static auto default_api_port(const provider_type &prov)
|
||||||
default_api_port(const provider_type &prov) -> std::uint16_t;
|
-> std::uint16_t;
|
||||||
|
|
||||||
[[nodiscard]] static auto
|
[[nodiscard]] static auto default_data_directory(const provider_type &prov)
|
||||||
default_data_directory(const provider_type &prov) -> std::string;
|
-> std::string;
|
||||||
|
|
||||||
[[nodiscard]] static auto
|
[[nodiscard]] static auto default_remote_api_port(const provider_type &prov)
|
||||||
default_remote_api_port(const provider_type &prov) -> std::uint16_t;
|
-> std::uint16_t;
|
||||||
|
|
||||||
[[nodiscard]] static auto
|
[[nodiscard]] static auto default_rpc_port(const provider_type &prov)
|
||||||
default_rpc_port(const provider_type &prov) -> std::uint16_t;
|
-> std::uint16_t;
|
||||||
|
|
||||||
[[nodiscard]] static auto
|
[[nodiscard]] static auto get_provider_display_name(const provider_type &prov)
|
||||||
get_provider_display_name(const provider_type &prov) -> std::string;
|
-> std::string;
|
||||||
|
|
||||||
[[nodiscard]] static auto
|
[[nodiscard]] static auto get_provider_name(const provider_type &prov)
|
||||||
get_provider_name(const provider_type &prov) -> std::string;
|
-> std::string;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] static auto get_stop_requested() -> bool;
|
[[nodiscard]] static auto get_stop_requested() -> bool;
|
||||||
@ -192,8 +192,11 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] auto get_task_wait_ms() const -> std::uint16_t;
|
[[nodiscard]] auto get_task_wait_ms() const -> std::uint16_t;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto get_value_by_name(const std::string &name) const
|
||||||
get_value_by_name(const std::string &name) const -> std::string;
|
-> std::string;
|
||||||
|
|
||||||
|
[[nodiscard]] auto get_raw_value_by_name(const std::string &name) const
|
||||||
|
-> std::string;
|
||||||
|
|
||||||
[[nodiscard]] auto get_version() const -> std::uint64_t;
|
[[nodiscard]] auto get_version() const -> std::uint64_t;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "utils/path.hpp"
|
#include "utils/path.hpp"
|
||||||
|
|
||||||
namespace repertory {
|
namespace repertory {
|
||||||
class config_test : public ::testing::Test {
|
class app_config_test : public ::testing::Test {
|
||||||
public:
|
public:
|
||||||
console_consumer cs;
|
console_consumer cs;
|
||||||
|
|
||||||
@ -40,28 +40,26 @@ public:
|
|||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
s3_directory = utils::path::combine(test::get_test_output_dir(),
|
s3_directory = utils::path::combine(test::get_test_output_dir(),
|
||||||
{
|
{
|
||||||
"config_test",
|
"app_config_test",
|
||||||
"s3",
|
"s3",
|
||||||
std::to_string(++idx),
|
std::to_string(++idx),
|
||||||
});
|
});
|
||||||
|
|
||||||
sia_directory = utils::path::combine(test::get_test_output_dir(),
|
sia_directory = utils::path::combine(test::get_test_output_dir(),
|
||||||
{
|
{
|
||||||
"config_test",
|
"app_config_test",
|
||||||
"sia",
|
"sia",
|
||||||
std::to_string(++idx),
|
std::to_string(++idx),
|
||||||
});
|
});
|
||||||
event_system::instance().start();
|
event_system::instance().start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() override {
|
void TearDown() override { event_system::instance().stop(); }
|
||||||
event_system::instance().stop();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::atomic<std::uint64_t> config_test::idx{0U};
|
std::atomic<std::uint64_t> app_config_test::idx{0U};
|
||||||
|
|
||||||
TEST_F(config_test, api_path) {
|
TEST_F(app_config_test, api_path) {
|
||||||
std::string original_value;
|
std::string original_value;
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -70,7 +68,7 @@ TEST_F(config_test, api_path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, api_auth) {
|
TEST_F(app_config_test, api_auth) {
|
||||||
std::string original_value;
|
std::string original_value;
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -84,7 +82,7 @@ TEST_F(config_test, api_auth) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, api_port) {
|
TEST_F(app_config_test, api_port) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -98,7 +96,7 @@ TEST_F(config_test, api_port) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, api_user) {
|
TEST_F(app_config_test, api_user) {
|
||||||
std::string original_value;
|
std::string original_value;
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -112,7 +110,7 @@ TEST_F(config_test, api_user) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, download_timeout_secs) {
|
TEST_F(app_config_test, download_timeout_secs) {
|
||||||
std::uint8_t original_value{};
|
std::uint8_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -126,7 +124,7 @@ TEST_F(config_test, download_timeout_secs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, enable_download_timeout) {
|
TEST_F(app_config_test, enable_download_timeout) {
|
||||||
bool original_value{};
|
bool original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -140,7 +138,7 @@ TEST_F(config_test, enable_download_timeout) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, enable_drive_events) {
|
TEST_F(app_config_test, enable_drive_events) {
|
||||||
bool original_value{};
|
bool original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -155,7 +153,7 @@ TEST_F(config_test, enable_drive_events) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
TEST_F(config_test, enable_mount_manager) {
|
TEST_F(app_config_test, enable_mount_manager) {
|
||||||
bool original_value;
|
bool original_value;
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -169,7 +167,7 @@ TEST_F(config_test, enable_mount_manager) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
TEST_F(config_test, event_level) {
|
TEST_F(app_config_test, event_level) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_event_level(event_level::debug);
|
config.set_event_level(event_level::debug);
|
||||||
@ -183,7 +181,7 @@ TEST_F(config_test, event_level) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, eviction_delay_mins) {
|
TEST_F(app_config_test, eviction_delay_mins) {
|
||||||
std::uint32_t original_value{};
|
std::uint32_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -197,7 +195,7 @@ TEST_F(config_test, eviction_delay_mins) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, eviction_uses_accessed_time) {
|
TEST_F(app_config_test, eviction_uses_accessed_time) {
|
||||||
bool original_value{};
|
bool original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -212,7 +210,7 @@ TEST_F(config_test, eviction_uses_accessed_time) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, high_frequency_interval_secs) {
|
TEST_F(app_config_test, high_frequency_interval_secs) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -226,7 +224,7 @@ TEST_F(config_test, high_frequency_interval_secs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, low_frequency_interval_secs) {
|
TEST_F(app_config_test, low_frequency_interval_secs) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -240,7 +238,7 @@ TEST_F(config_test, low_frequency_interval_secs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, med_frequency_interval_secs) {
|
TEST_F(app_config_test, med_frequency_interval_secs) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -254,10 +252,15 @@ TEST_F(config_test, med_frequency_interval_secs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, max_cache_size_bytes) {
|
TEST_F(app_config_test, max_cache_size_bytes) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_max_cache_size_bytes(100 * 1024 * 1024);
|
config.get_max_cache_size_bytes();
|
||||||
|
EXPECT_EQ(default_max_cache_size_bytes, config.get_max_cache_size_bytes());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
app_config config(provider_type::sia, sia_directory);
|
||||||
|
config.set_max_cache_size_bytes(100U * 1024U * 1024U);
|
||||||
EXPECT_EQ(100U * 1024 * 1024, config.get_max_cache_size_bytes());
|
EXPECT_EQ(100U * 1024 * 1024, config.get_max_cache_size_bytes());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -266,7 +269,7 @@ TEST_F(config_test, max_cache_size_bytes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, max_upload_count) {
|
TEST_F(app_config_test, max_upload_count) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_max_upload_count(8U);
|
config.set_max_upload_count(8U);
|
||||||
@ -283,7 +286,7 @@ TEST_F(config_test, max_upload_count) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, online_check_retry_secs) {
|
TEST_F(app_config_test, online_check_retry_secs) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -297,7 +300,7 @@ TEST_F(config_test, online_check_retry_secs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, online_check_retry_secs_minimum_value) {
|
TEST_F(app_config_test, online_check_retry_secs_minimum_value) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_online_check_retry_secs(14);
|
config.set_online_check_retry_secs(14);
|
||||||
@ -305,7 +308,7 @@ TEST_F(config_test, online_check_retry_secs_minimum_value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, orphaned_file_retention_days) {
|
TEST_F(app_config_test, orphaned_file_retention_days) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -319,7 +322,7 @@ TEST_F(config_test, orphaned_file_retention_days) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, orphaned_file_retention_days_minimum_value) {
|
TEST_F(app_config_test, orphaned_file_retention_days_minimum_value) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_orphaned_file_retention_days(0);
|
config.set_orphaned_file_retention_days(0);
|
||||||
@ -327,7 +330,7 @@ TEST_F(config_test, orphaned_file_retention_days_minimum_value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, orphaned_file_retention_days_maximum_value) {
|
TEST_F(app_config_test, orphaned_file_retention_days_maximum_value) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_orphaned_file_retention_days(32);
|
config.set_orphaned_file_retention_days(32);
|
||||||
@ -335,7 +338,7 @@ TEST_F(config_test, orphaned_file_retention_days_maximum_value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, get_cache_directory) {
|
TEST_F(app_config_test, get_cache_directory) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
EXPECT_STREQ(utils::path::combine(sia_directory, {"cache"}).c_str(),
|
EXPECT_STREQ(utils::path::combine(sia_directory, {"cache"}).c_str(),
|
||||||
@ -343,7 +346,7 @@ TEST_F(config_test, get_cache_directory) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, get_config_file_path) {
|
TEST_F(app_config_test, get_config_file_path) {
|
||||||
{
|
{
|
||||||
const auto config_file = utils::path::absolute(
|
const auto config_file = utils::path::absolute(
|
||||||
utils::path::combine(sia_directory, {"config.json"}));
|
utils::path::combine(sia_directory, {"config.json"}));
|
||||||
@ -353,14 +356,14 @@ TEST_F(config_test, get_config_file_path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, get_data_directory) {
|
TEST_F(app_config_test, get_data_directory) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
EXPECT_STREQ(sia_directory.c_str(), config.get_data_directory().c_str());
|
EXPECT_STREQ(sia_directory.c_str(), config.get_data_directory().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, get_log_directory) {
|
TEST_F(app_config_test, get_log_directory) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
EXPECT_STREQ(utils::path::combine(sia_directory, {"logs"}).c_str(),
|
EXPECT_STREQ(utils::path::combine(sia_directory, {"logs"}).c_str(),
|
||||||
@ -368,7 +371,7 @@ TEST_F(config_test, get_log_directory) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, ring_buffer_file_size) {
|
TEST_F(app_config_test, ring_buffer_file_size) {
|
||||||
std::uint16_t original_value;
|
std::uint16_t original_value;
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -382,7 +385,7 @@ TEST_F(config_test, ring_buffer_file_size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, ring_buffer_file_size_minimum_size) {
|
TEST_F(app_config_test, ring_buffer_file_size_minimum_size) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_ring_buffer_file_size(63u);
|
config.set_ring_buffer_file_size(63u);
|
||||||
@ -394,7 +397,7 @@ TEST_F(config_test, ring_buffer_file_size_minimum_size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, ring_buffer_file_size_maximum_size) {
|
TEST_F(app_config_test, ring_buffer_file_size_maximum_size) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_ring_buffer_file_size(1025u);
|
config.set_ring_buffer_file_size(1025u);
|
||||||
@ -406,7 +409,7 @@ TEST_F(config_test, ring_buffer_file_size_maximum_size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, preferred_download_type) {
|
TEST_F(app_config_test, preferred_download_type) {
|
||||||
download_type original_value;
|
download_type original_value;
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -420,16 +423,16 @@ TEST_F(config_test, preferred_download_type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, default_agent_name) {
|
TEST_F(app_config_test, default_agent_name) {
|
||||||
EXPECT_STREQ("Sia-Agent",
|
EXPECT_STREQ("Sia-Agent",
|
||||||
app_config::default_agent_name(provider_type::sia).c_str());
|
app_config::default_agent_name(provider_type::sia).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, default_api_port) {
|
TEST_F(app_config_test, default_api_port) {
|
||||||
EXPECT_EQ(9980U, app_config::default_api_port(provider_type::sia));
|
EXPECT_EQ(9980U, app_config::default_api_port(provider_type::sia));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, default_data_directory) {
|
TEST_F(app_config_test, default_data_directory) {
|
||||||
const std::array<std::string, 1U> data_directory = {
|
const std::array<std::string, 1U> data_directory = {
|
||||||
app_config::default_data_directory(provider_type::sia),
|
app_config::default_data_directory(provider_type::sia),
|
||||||
};
|
};
|
||||||
@ -450,21 +453,21 @@ TEST_F(config_test, default_data_directory) {
|
|||||||
EXPECT_STREQ(expected_directory.c_str(), data_directory[0].c_str());
|
EXPECT_STREQ(expected_directory.c_str(), data_directory[0].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, default_rpc_port) {
|
TEST_F(app_config_test, default_rpc_port) {
|
||||||
EXPECT_EQ(10000U, app_config::default_rpc_port(provider_type::sia));
|
EXPECT_EQ(10000U, app_config::default_rpc_port(provider_type::sia));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, get_provider_display_name) {
|
TEST_F(app_config_test, get_provider_display_name) {
|
||||||
EXPECT_STREQ(
|
EXPECT_STREQ(
|
||||||
"Sia", app_config::get_provider_display_name(provider_type::sia).c_str());
|
"Sia", app_config::get_provider_display_name(provider_type::sia).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, get_provider_name) {
|
TEST_F(app_config_test, get_provider_name) {
|
||||||
EXPECT_STREQ("sia",
|
EXPECT_STREQ("sia",
|
||||||
app_config::get_provider_name(provider_type::sia).c_str());
|
app_config::get_provider_name(provider_type::sia).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, get_version) {
|
TEST_F(app_config_test, get_version) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
EXPECT_EQ(REPERTORY_CONFIG_VERSION, config.get_version());
|
EXPECT_EQ(REPERTORY_CONFIG_VERSION, config.get_version());
|
||||||
@ -636,7 +639,7 @@ TEST_F(config_test, get_version) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
TEST_F(config_test, retry_read_count) {
|
TEST_F(app_config_test, retry_read_count) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -650,7 +653,7 @@ TEST_F(config_test, retry_read_count) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, retry_read_count_minimum_value) {
|
TEST_F(app_config_test, retry_read_count_minimum_value) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_retry_read_count(1);
|
config.set_retry_read_count(1);
|
||||||
@ -658,7 +661,7 @@ TEST_F(config_test, retry_read_count_minimum_value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, task_wait_ms) {
|
TEST_F(app_config_test, task_wait_ms) {
|
||||||
std::uint16_t original_value{};
|
std::uint16_t original_value{};
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
@ -672,7 +675,7 @@ TEST_F(config_test, task_wait_ms) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, task_wait_ms_minimum_value) {
|
TEST_F(app_config_test, task_wait_ms_minimum_value) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_task_wait_ms(1U);
|
config.set_task_wait_ms(1U);
|
||||||
@ -680,7 +683,7 @@ TEST_F(config_test, task_wait_ms_minimum_value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(config_test, can_set_database_type) {
|
TEST_F(app_config_test, can_set_database_type) {
|
||||||
{
|
{
|
||||||
app_config config(provider_type::sia, sia_directory);
|
app_config config(provider_type::sia, sia_directory);
|
||||||
config.set_database_type(database_type::rocksdb);
|
config.set_database_type(database_type::rocksdb);
|
Loading…
x
Reference in New Issue
Block a user