✨ feat(module manager internal API): remove new_with_file
This commit is contained in:
@@ -38,11 +38,13 @@ TEST(polling_manager, basic_polling_module) {
|
||||
|
||||
struct mq_schema *mq_schema=mq_schema_new();
|
||||
|
||||
FILE *fp = fmemopen((void *)gtest_mock_spec_toml, strlen(gtest_mock_spec_toml), "r");
|
||||
EXPECT_TRUE(fp!=NULL);
|
||||
char toml_template[] = "./stellar.toml.XXXXXX";
|
||||
int fd = mkstemp(toml_template);
|
||||
EXPECT_TRUE(fd>=0);
|
||||
write(fd, gtest_mock_spec_toml, strlen(gtest_mock_spec_toml));
|
||||
close(fd);
|
||||
|
||||
struct stellar_module_manager *mod_mgr=stellar_module_manager_new_with_file(fp, 10, mq_schema);
|
||||
fclose(fp);
|
||||
struct stellar_module_manager *mod_mgr=stellar_module_manager_new(toml_template, 10, mq_schema);
|
||||
EXPECT_TRUE(mod_mgr!=NULL);
|
||||
|
||||
struct stellar_polling_manager *polling_mgr=stellar_module_get_polling_manager(mod_mgr);
|
||||
@@ -71,6 +73,8 @@ TEST(polling_manager, basic_polling_module) {
|
||||
|
||||
EXPECT_EQ(env.polling_count, env.N_round+env.polling_active_count);
|
||||
|
||||
unlink(toml_template);
|
||||
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
|
||||
Reference in New Issue
Block a user