This source file includes following definitions.
- op_is_probe_test
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <crm/common/unittest_internal.h>
13
14 static void
15 op_is_probe_test(void **state)
16 {
17 xmlNode *node = NULL;
18
19 assert_false(pcmk_xe_is_probe(NULL));
20
21 node = string2xml("<lrm_rsc_op/>");
22 assert_false(pcmk_xe_is_probe(node));
23 free_xml(node);
24
25 node = string2xml("<lrm_rsc_op operation_key=\"blah\" interval=\"30s\"/>");
26 assert_false(pcmk_xe_is_probe(node));
27 free_xml(node);
28
29 node = string2xml("<lrm_rsc_op operation=\"monitor\" interval=\"30s\"/>");
30 assert_false(pcmk_xe_is_probe(node));
31 free_xml(node);
32
33 node = string2xml("<lrm_rsc_op operation=\"start\" interval=\"0\"/>");
34 assert_false(pcmk_xe_is_probe(node));
35 free_xml(node);
36
37 node = string2xml("<lrm_rsc_op operation=\"monitor\" interval=\"0\"/>");
38 assert_true(pcmk_xe_is_probe(node));
39 free_xml(node);
40 }
41
42 PCMK__UNIT_TEST(NULL, NULL,
43 cmocka_unit_test(op_is_probe_test))