20 op_is_not_probe_test(
void **state) {
27 node =
string2xml(
"<lrm_rsc_op operation=\"start\" interval=\"0\"/>");
33 op_does_not_have_right_values_test(
void **state) {
36 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\"/>");
40 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"0\" op-status=\"\"/>");
46 check_values_test(
void **state) {
50 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"0\" op-status=\"3\"/>");
54 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"5\" op-status=\"3\"/>");
59 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"0\" op-status=\"0\"/>");
63 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"2\" op-status=\"0\"/>");
67 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"5\" op-status=\"0\"/>");
71 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"6\" op-status=\"0\"/>");
75 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"7\" op-status=\"0\"/>");
80 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"0\" op-status=\"7\"/>");
84 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"5\" op-status=\"7\"/>");
89 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"0\" op-status=\"4\"/>");
93 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"2\" op-status=\"4\"/>");
97 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"5\" op-status=\"4\"/>");
101 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"6\" op-status=\"4\"/>");
105 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"7\" op-status=\"4\"/>");
110 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"0\" op-status=\"5\"/>");
114 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"2\" op-status=\"5\"/>");
118 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"5\" op-status=\"5\"/>");
122 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"6\" op-status=\"5\"/>");
126 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"7\" op-status=\"5\"/>");
131 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"0\" op-status=\"6\"/>");
135 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"2\" op-status=\"6\"/>");
139 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"5\" op-status=\"6\"/>");
143 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"6\" op-status=\"6\"/>");
147 node =
string2xml(
"<lrm_rsc_op operation=\"monitor\" interval=\"0\" rc-code=\"7\" op-status=\"6\"/>");
152 int main(
int argc,
char **argv)
154 const struct CMUnitTest tests[] = {
155 cmocka_unit_test(op_is_not_probe_test),
156 cmocka_unit_test(op_does_not_have_right_values_test),
157 cmocka_unit_test(check_values_test),
160 cmocka_set_message_output(CM_OUTPUT_TAP);
161 return cmocka_run_group_tests(tests, NULL, NULL);
xmlNode * string2xml(const char *input)
bool pcmk_xe_mask_probe_failure(xmlNode *xml_op)
void free_xml(xmlNode *child)
int main(int argc, char **argv)