19 static int counter = 1;
20 static int return_false = -1;
22 static char rsc1_id[] =
"rsc1";
23 static char rsc2_id[] =
"rsc2";
24 static char rsc3_id[] =
"rsc3";
41 assert_string_equal(rsc->
id, expected_id);
44 return counter++ != return_false;
48 null_args(
void **state)
64 assert_int_equal(counter, 1);
68 list_of_0(
void **state)
79 assert_int_equal(counter, 1);
83 list_of_1(
void **state)
96 assert_int_equal(counter, 2);
102 list_of_3(
void **state)
117 assert_int_equal(counter, 4);
123 list_of_3_return_false(
void **state)
139 assert_int_equal(counter, 3);
145 cmocka_unit_test(null_args),
146 cmocka_unit_test(list_of_0),
147 cmocka_unit_test(list_of_1),
148 cmocka_unit_test(list_of_3),
149 cmocka_unit_test(list_of_3_return_false))
Scheduler API for resources.
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
struct pe_node_shared_s * details
bool pcmk_foreach_active_resource(pcmk_node_t *node, bool(*fn)(pcmk_resource_t *, void *), void *user_data)