pacemaker
2.1.9-49aab99839
Scalable High-Availability cluster resource manager
lib
common
tests
scheduler
pcmk_get_no_quorum_policy_test.c
Go to the documentation of this file.
1
/*
2
* Copyright 2024 the Pacemaker project contributors
3
*
4
* The version control history for this file may have further details.
5
*
6
* This source code is licensed under the GNU General Public License version 2
7
* or later (GPLv2+) WITHOUT ANY WARRANTY.
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))
pe_working_set_s::no_quorum_policy
enum pe_quorum_policy no_quorum_policy
Definition:
scheduler.h:217
PCMK__UNIT_TEST
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
Definition:
unittest_internal.h:188
pcmk_no_quorum_stop
Definition:
scheduler.h:42
pe_working_set_s
Definition:
scheduler.h:191
scheduler.h
Scheduler API.
crm_internal.h
pcmk_no_quorum_fence
Definition:
scheduler.h:44
scheduler
pcmk_scheduler_t * scheduler
Definition:
native_find_rsc_test.c:19
unittest_internal.h
pcmk_get_no_quorum_policy
enum pe_quorum_policy pcmk_get_no_quorum_policy(const pcmk_scheduler_t *scheduler)
Definition:
scheduler.c:47
Generated on Thu Oct 31 2024 15:49:03 for pacemaker by
1.8.14