MySQL 8.4.2
Source Code Documentation
test_helpers.cc File Reference

Functions

::testing::AssertionResult AssertLoaderSectionAvailable (const char *loader_expr, const char *section_expr, mysql_harness::Loader *loader, const std::string &section_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...
 

Function Documentation

◆ AssertLoaderSectionAvailable()

::testing::AssertionResult AssertLoaderSectionAvailable ( const char *  loader_expr,
const char *  section_expr,
mysql_harness::Loader loader,
const std::string &  section_name 
)

◆ init_test_logger()

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.

◆ register_test_logger()

void register_test_logger ( )

Just register logger with DIM for unit tests (unlike init_log(), which also initializes it)