Skip to content

Commit

Permalink
config/config_store_test: unit testing for aliases in yaml source
Browse files Browse the repository at this point in the history
  • Loading branch information
andijcr committed Dec 18, 2023
1 parent b025e34 commit b76f908
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/v/config/tests/config_store_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ YAML::Node valid_configuration() {
" - two\n"
" - three\n"
"nullable_int: 111\n"
"secret_string: actual_secret\n");
"secret_string: actual_secret\n"
"aliased_bool_legacy: false\n");
}

} // namespace
Expand Down Expand Up @@ -214,6 +215,7 @@ SEASTAR_THREAD_TEST_CASE(read_valid_configuration) {
BOOST_TEST(cfg.strings().at(2) == "three");
BOOST_TEST(cfg.nullable_int() == std::make_optional(111));
BOOST_TEST(cfg.secret_string() == "actual_secret");
BOOST_TEST(cfg.aliased_bool() == false);
};

SEASTAR_THREAD_TEST_CASE(update_property_value) {
Expand Down Expand Up @@ -525,4 +527,6 @@ SEASTAR_THREAD_TEST_CASE(property_aliasing) {
auto property_names = cfg.property_names();
BOOST_TEST(property_names.contains("aliased_bool") == true);
BOOST_TEST(property_names.contains("aliased_bool_legacy") == false);

BOOST_TEST(cfg.property_names_and_aliases().contains("aliased_bool"));
}

0 comments on commit b76f908

Please sign in to comment.