refactor test names
This commit is contained in:
parent
315db0b662
commit
0398696e54
@ -24,7 +24,7 @@
|
||||
#include "types/repertory.hpp"
|
||||
|
||||
namespace repertory {
|
||||
TEST(atomic, atomic_primitive) {
|
||||
TEST(atomic_test, atomic_primitive) {
|
||||
atomic<std::uint16_t> value;
|
||||
value = 5U;
|
||||
EXPECT_EQ(5U, static_cast<std::uint16_t>(value));
|
||||
@ -35,7 +35,7 @@ TEST(atomic, atomic_primitive) {
|
||||
EXPECT_EQ(6U, value.load());
|
||||
}
|
||||
|
||||
TEST(atomic, atomic_primitive_equality) {
|
||||
TEST(atomic_test, atomic_primitive_equality) {
|
||||
atomic<std::uint16_t> value1{5U};
|
||||
atomic<std::uint16_t> value2{5U};
|
||||
EXPECT_EQ(value1, value1);
|
||||
@ -45,7 +45,7 @@ TEST(atomic, atomic_primitive_equality) {
|
||||
EXPECT_EQ(static_cast<std::uint16_t>(value2), 5U);
|
||||
}
|
||||
|
||||
TEST(atomic, atomic_primitive_inequality) {
|
||||
TEST(atomic_test, atomic_primitive_inequality) {
|
||||
atomic<std::uint16_t> value1{5U};
|
||||
atomic<std::uint16_t> value2{6U};
|
||||
EXPECT_NE(value1, value2);
|
||||
@ -53,7 +53,7 @@ TEST(atomic, atomic_primitive_inequality) {
|
||||
EXPECT_NE(static_cast<std::uint16_t>(value2), 5U);
|
||||
}
|
||||
|
||||
TEST(atomic, atomic_struct) {
|
||||
TEST(atomic_test, atomic_struct) {
|
||||
atomic<encrypt_config> value{
|
||||
encrypt_config{
|
||||
.encryption_token = "token",
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "types/repertory.hpp"
|
||||
|
||||
namespace repertory {
|
||||
TEST(curl_comm, can_create_s3_host_config) {
|
||||
TEST(curl_comm_test, can_create_s3_host_config) {
|
||||
s3_config config{};
|
||||
config.bucket = "repertory";
|
||||
config.url = "https://s3.test.com";
|
||||
@ -37,7 +37,7 @@ TEST(curl_comm, can_create_s3_host_config) {
|
||||
EXPECT_TRUE(hc.path.empty());
|
||||
}
|
||||
|
||||
TEST(curl_comm, can_create_s3_host_config_with_path_style) {
|
||||
TEST(curl_comm_test, can_create_s3_host_config_with_path_style) {
|
||||
s3_config config{};
|
||||
config.bucket = "repertory";
|
||||
config.url = "https://s3.test.com";
|
||||
@ -49,7 +49,7 @@ TEST(curl_comm, can_create_s3_host_config_with_path_style) {
|
||||
EXPECT_STREQ("/repertory", hc.path.c_str());
|
||||
}
|
||||
|
||||
TEST(curl_comm, can_create_s3_host_config_with_region) {
|
||||
TEST(curl_comm_test, can_create_s3_host_config_with_region) {
|
||||
s3_config config{};
|
||||
config.bucket = "repertory";
|
||||
config.url = "https://s3.test.com";
|
||||
@ -62,7 +62,7 @@ TEST(curl_comm, can_create_s3_host_config_with_region) {
|
||||
EXPECT_TRUE(hc.path.empty());
|
||||
}
|
||||
|
||||
TEST(curl_comm, can_create_s3_host_config_with_region_and_path_style) {
|
||||
TEST(curl_comm_test, can_create_s3_host_config_with_region_and_path_style) {
|
||||
s3_config config{};
|
||||
config.bucket = "repertory";
|
||||
config.url = "https://s3.test.com";
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "types/repertory.hpp"
|
||||
|
||||
namespace repertory {
|
||||
TEST(json_serialize, can_handle_directory_item) {
|
||||
TEST(json_serialize_test, can_handle_directory_item) {
|
||||
directory_item cfg{
|
||||
"api", "parent", true, 2U, {{META_DIRECTORY, "true"}},
|
||||
};
|
||||
@ -47,7 +47,7 @@ TEST(json_serialize, can_handle_directory_item) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_encrypt_config) {
|
||||
TEST(json_serialize_test, can_handle_encrypt_config) {
|
||||
encrypt_config cfg{
|
||||
"token",
|
||||
"path",
|
||||
@ -65,7 +65,7 @@ TEST(json_serialize, can_handle_encrypt_config) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_host_config) {
|
||||
TEST(json_serialize_test, can_handle_host_config) {
|
||||
host_config cfg{
|
||||
"agent", "pwd", "user", 1024U, "host", "path", "http", 11U,
|
||||
};
|
||||
@ -94,7 +94,7 @@ TEST(json_serialize, can_handle_host_config) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_remote_config) {
|
||||
TEST(json_serialize_test, can_handle_remote_config) {
|
||||
remote::remote_config cfg{
|
||||
1024U, "token", "host", 11U, 20U, 21U,
|
||||
};
|
||||
@ -120,7 +120,7 @@ TEST(json_serialize, can_handle_remote_config) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_remote_mount) {
|
||||
TEST(json_serialize_test, can_handle_remote_mount) {
|
||||
remote::remote_mount cfg{1024U, 21U, true, "token"};
|
||||
|
||||
json data(cfg);
|
||||
@ -139,7 +139,7 @@ TEST(json_serialize, can_handle_remote_mount) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_s3_config) {
|
||||
TEST(json_serialize_test, can_handle_s3_config) {
|
||||
s3_config cfg{
|
||||
"access", "bucket", "token", "region", "secret", 31U, "url", true, false,
|
||||
};
|
||||
@ -170,7 +170,7 @@ TEST(json_serialize, can_handle_s3_config) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_sia_config) {
|
||||
TEST(json_serialize_test, can_handle_sia_config) {
|
||||
sia_config cfg{
|
||||
"bucket",
|
||||
};
|
||||
@ -184,7 +184,7 @@ TEST(json_serialize, can_handle_sia_config) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_atomic) {
|
||||
TEST(json_serialize_test, can_handle_atomic) {
|
||||
atomic<sia_config> cfg({
|
||||
"bucket",
|
||||
});
|
||||
@ -198,7 +198,7 @@ TEST(json_serialize, can_handle_atomic) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_database_type) {
|
||||
TEST(json_serialize_test, can_handle_database_type) {
|
||||
json data(database_type::rocksdb);
|
||||
EXPECT_EQ(database_type::rocksdb, data.get<database_type>());
|
||||
EXPECT_STREQ("rocksdb", data.get<std::string>().c_str());
|
||||
@ -208,7 +208,7 @@ TEST(json_serialize, can_handle_database_type) {
|
||||
EXPECT_STREQ("sqlite", data.get<std::string>().c_str());
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_download_type) {
|
||||
TEST(json_serialize_test, can_handle_download_type) {
|
||||
json data(download_type::direct);
|
||||
EXPECT_EQ(download_type::direct, data.get<download_type>());
|
||||
EXPECT_STREQ("direct", data.get<std::string>().c_str());
|
||||
@ -222,7 +222,7 @@ TEST(json_serialize, can_handle_download_type) {
|
||||
EXPECT_STREQ("ring_buffer", data.get<std::string>().c_str());
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_atomic_database_type) {
|
||||
TEST(json_serialize_test, can_handle_atomic_database_type) {
|
||||
json data(atomic<database_type>{database_type::rocksdb});
|
||||
EXPECT_EQ(database_type::rocksdb, data.get<atomic<database_type>>());
|
||||
EXPECT_STREQ("rocksdb", data.get<std::string>().c_str());
|
||||
@ -232,7 +232,7 @@ TEST(json_serialize, can_handle_atomic_database_type) {
|
||||
EXPECT_STREQ("sqlite", data.get<std::string>().c_str());
|
||||
}
|
||||
|
||||
TEST(json_serialize, can_handle_atomic_download_type) {
|
||||
TEST(json_serialize_test, can_handle_atomic_download_type) {
|
||||
json data(atomic<download_type>{download_type::direct});
|
||||
EXPECT_EQ(download_type::direct, data.get<atomic<download_type>>());
|
||||
EXPECT_STREQ("direct", data.get<std::string>().c_str());
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
namespace repertory {
|
||||
TEST(lock_data, lock_and_unlock) {
|
||||
TEST(lock_data_test, lock_and_unlock) {
|
||||
{
|
||||
lock_data l(provider_type::sia, "1");
|
||||
EXPECT_EQ(lock_result::success, l.grab_lock());
|
||||
@ -50,7 +50,7 @@ TEST(lock_data, lock_and_unlock) {
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
TEST(lock_data, set_and_unset_mount_state) {
|
||||
TEST(lock_data_test, set_and_unset_mount_state) {
|
||||
lock_data l(provider_type::sia, "1");
|
||||
EXPECT_TRUE(l.set_mount_state(true, "C:", 99));
|
||||
|
||||
@ -83,7 +83,7 @@ TEST(lock_data, set_and_unset_mount_state) {
|
||||
mount_state["Remote2"].dump().c_str());
|
||||
}
|
||||
#else
|
||||
TEST(lock_data, set_and_unset_mount_state) {
|
||||
TEST(lock_data_test, set_and_unset_mount_state) {
|
||||
lock_data l(provider_type::sia, "1");
|
||||
EXPECT_TRUE(l.set_mount_state(true, "/mnt/1", 99));
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "comm/packet/packet.hpp"
|
||||
|
||||
namespace repertory {
|
||||
TEST(packet, encrypt_and_decrypt) {
|
||||
TEST(packet_test, encrypt_and_decrypt) {
|
||||
packet test_packet;
|
||||
test_packet.encode("test");
|
||||
test_packet.encrypt("moose");
|
||||
|
@ -629,7 +629,7 @@ static void run_tests(const app_config &cfg, i_provider &provider) {
|
||||
upload_file(provider); */
|
||||
}
|
||||
|
||||
TEST(providers, encrypt_provider) {
|
||||
TEST(providers_test, encrypt_provider) {
|
||||
const auto config_path =
|
||||
utils::path::combine(test::get_test_output_dir(), {"encrypt_provider"});
|
||||
|
||||
@ -673,7 +673,7 @@ TEST(providers, encrypt_provider) {
|
||||
event_system::instance().stop();
|
||||
}
|
||||
|
||||
TEST(providers, s3_provider) {
|
||||
TEST(providers_test, s3_provider) {
|
||||
const auto config_path =
|
||||
utils::path::combine(test::get_test_output_dir(), {"s3_provider"});
|
||||
|
||||
@ -713,7 +713,7 @@ TEST(providers, s3_provider) {
|
||||
event_system::instance().stop();
|
||||
}
|
||||
|
||||
TEST(providers, sia_provider) {
|
||||
TEST(providers_test, sia_provider) {
|
||||
const auto config_path =
|
||||
utils::path::combine(test::get_test_output_dir(), {"sia_provider"});
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
namespace repertory {
|
||||
static constexpr const std::size_t test_chunk_size{1024U};
|
||||
|
||||
TEST(upload, can_upload_a_valid_file) {
|
||||
TEST(upload_test, can_upload_a_valid_file) {
|
||||
console_consumer con;
|
||||
|
||||
event_system::instance().start();
|
||||
@ -71,7 +71,7 @@ TEST(upload, can_upload_a_valid_file) {
|
||||
event_system::instance().stop();
|
||||
}
|
||||
|
||||
TEST(upload, can_cancel_upload) {
|
||||
TEST(upload_test, can_cancel_upload) {
|
||||
console_consumer con;
|
||||
|
||||
event_system::instance().start();
|
||||
@ -135,7 +135,7 @@ TEST(upload, can_cancel_upload) {
|
||||
event_system::instance().stop();
|
||||
}
|
||||
|
||||
TEST(upload, can_stop_upload) {
|
||||
TEST(upload_test, can_stop_upload) {
|
||||
console_consumer con;
|
||||
|
||||
event_system::instance().start();
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "utils/file.hpp"
|
||||
|
||||
namespace repertory {
|
||||
TEST(utils, convert_api_date) {
|
||||
TEST(utils_test, convert_api_date) {
|
||||
#if defined(_WIN32)
|
||||
auto file_time = utils::time::unix_time_to_filetime(
|
||||
s3_provider::convert_api_date("2009-10-12T17:50:30.111Z"));
|
||||
@ -63,7 +63,7 @@ TEST(utils, convert_api_date) {
|
||||
#endif // defined(_WIN32)
|
||||
}
|
||||
|
||||
TEST(utils, generate_sha256) {
|
||||
TEST(utils_test, generate_sha256) {
|
||||
auto res = utils::file::file{__FILE__}.sha256();
|
||||
EXPECT_TRUE(res.has_value());
|
||||
if (res.has_value()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user