Definition at line 12 of file test_threshold.cpp.
◆ file_space_handler_t
◆ threshold_fixture()
threshold_fixture::threshold_fixture |
( |
| ) |
|
|
inline |
Definition at line 32 of file test_threshold.cpp.
34 {
35 }
file_space_handler_t space_handler
boost::asio::io_context ctx
◆ add_file_system()
void threshold_fixture::add_file_system |
( |
const bfs::path & | path_name | ) |
|
|
inline |
Definition at line 37 of file test_threshold.cpp.
37 {
39 }
void add_file_system(const bfs::path &path_name)
◆ is_threshold_exceeded()
bool threshold_fixture::is_threshold_exceeded |
( |
| ) |
|
|
inline |
◆ set_shutdown_on_exceeded()
void threshold_fixture::set_shutdown_on_exceeded |
( |
bool | shutdown_on_exceeded | ) |
|
|
inline |
Definition at line 49 of file test_threshold.cpp.
49 {
51 }
void set_shutdown_on_exceeded(bool new_shutdown_on_exceeded)
◆ set_threshold()
void threshold_fixture::set_threshold |
( |
uint32_t | threshold, |
|
|
uint32_t | warning_threshold ) |
|
inline |
Definition at line 41 of file test_threshold.cpp.
41 {
43 }
void set_threshold(uint32_t new_threshold, uint32_t new_warning_threshold)
◆ test_threshold_common()
bool threshold_fixture::test_threshold_common |
( |
std::map< bfs::path, uintmax_t > & | available, |
|
|
std::map< bfs::path, int > & | dev, |
|
|
uint32_t | warning_threshold = 75 ) |
|
inline |
Definition at line 53 of file test_threshold.cpp.
54 {
55 mock_get_space = [available](
const bfs::path&
p, boost::system::error_code& ec)
mutable -> bfs::space_info {
56 ec = boost::system::errc::make_error_code(errc::success);
57
59 rc.capacity = 1000000;
60 rc.available = available[
p];
61
63 };
64
68
69 return 0;
70 };
71
74
75 for (auto i = 0; i < available.size(); i++) {
77 }
78
80 }
wraps boost::filesystem::path to provide platform independent path manipulation.
Immutable except for fc::from_variant.
void set_shutdown_on_exceeded(bool shutdown_on_exceeded)
void set_threshold(uint32_t threshold, uint32_t warning_threshold)
void add_file_system(const bfs::path &path_name)
std::function< int(const char *path, struct stat *buf)> mock_get_stat
bool is_threshold_exceeded()
std::function< bfs::space_info(const bfs::path &p, boost::system::error_code &ec)> mock_get_space
◆ ctx
boost::asio::io_context threshold_fixture::ctx |
◆ mock_get_space
std::function<bfs::space_info(const bfs::path& p, boost::system::error_code& ec)> threshold_fixture::mock_get_space |
◆ mock_get_stat
std::function<int(const char *path, struct stat *buf)> threshold_fixture::mock_get_stat |
◆ space_handler
The documentation for this struct was generated from the following file: