MySQL 9.1.0
Source Code Documentation
|
#include "test/helpers.h"
#include "dim.h"
#include "mysql/harness/loader.h"
#include "mysql/harness/logging/registry.h"
Functions | |
::testing::AssertionResult | AssertLoaderSectionAvailable (const char *loader_expr, const char *section_expr, mysql_harness::Loader *loader, const std::string §ion_name) |
void | register_test_logger () |
Just register logger with DIM for unit tests (unlike init_log(), which also initializes it) More... | |
void | init_test_logger (const std::list< std::string > &additional_log_domains, const std::string &log_folder, const std::string &log_filename) |
Register + init logger for unit tests. More... | |
::testing::AssertionResult AssertLoaderSectionAvailable | ( | const char * | loader_expr, |
const char * | section_expr, | ||
mysql_harness::Loader * | loader, | ||
const std::string & | section_name | ||
) |
void init_test_logger | ( | const std::list< std::string > & | additional_log_domains = {} , |
const std::string & | log_folder = "" , |
||
const std::string & | log_filename = "" |
||
) |
Register + init logger for unit tests.
Creates application ("main") logger, which will write all messages to the console. Almost all of our code relies on the fact of "main" logger being initialized, so it is necessary to provide one for unit tests. Also, some unit tests analyze log output, and expect that output to exist on stderr.
void register_test_logger | ( | ) |
Just register logger with DIM for unit tests (unlike init_log(), which also initializes it)