Currently optional test context setup settings are passed by adding a new optional argument to the constructors. For example extra_args
. This is problematic, because:
- Adding more optional settings in the future requires touching all affected constructors, increasing their verbosity.
- Setting only a later option requires setting the earlier ones.
- Clang-tidy named args passed to
std::make_unique
are not checked.
Fix all issues by adding a new struct TestOpts
, which holds all options. Notes:
- The chain type is not an option in the struct for now, because the default values vary.
- The struct holds all possible test options globally. Not all fields may be used by all constructors. Albeit harmless, it is up to the test author to not set a field that is unused.