[bitshares/bitshares-core] ElasticSearch test cases framework (#1047)

jmjatlanta commented on this pull request.

> @@ -114,8 +114,23 @@ database_fixture::database_fixture()
options.insert(std::make_pair(“track-account”, boost::program_options::variable_value(track_account, false)));
}

– ahplugin->plugin_set_app(&app);
– ahplugin->plugin_initialize(options);
+ if(boost::unit_test::framework::current_test_case().p_name.value == “es1”) {

Old-school OO suggestion: if all your ES test cases are in different files than test cases that don’t need ES, extend “database_fixture“ to “database_fixture_with_elastic_search“ and use that new class in those files.

I would not be surprised if there is a better way, but that was the first thing that popped in my head.

This post was last modified on June 13, 2018, 2:26 pm