This source file includes following definitions.
- null_scheduler
- valid_no_quorum_policy
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <crm/common/scheduler.h>
13 #include <crm/common/unittest_internal.h>
14
15 static void
16 null_scheduler(void **state)
17 {
18 assert_int_equal(pcmk_get_no_quorum_policy(NULL), pcmk_no_quorum_stop);
19 }
20
21 static void
22 valid_no_quorum_policy(void **state)
23 {
24 pcmk_scheduler_t scheduler = {
25 .no_quorum_policy = pcmk_no_quorum_fence,
26 };
27
28 assert_int_equal(pcmk_get_no_quorum_policy(&scheduler),
29 pcmk_no_quorum_fence);
30 }
31
32 PCMK__UNIT_TEST(NULL, NULL,
33 cmocka_unit_test(null_scheduler),
34 cmocka_unit_test(valid_no_quorum_policy))