17 static char *cib_path = NULL;
20 cib_not_connected(
void **state)
34 setup_test(
void **state)
38 if (cib_path == NULL) {
46 teardown_test(
void **state)
54 bad_arguments(
void **state)
66 unknown_ticket(
void **state)
81 ticket_granted(
void **state)
91 ticket_exists(
void **state)
94 xmlNode *xml_search = NULL;
105 assert_null(xml_search);
112 force_delete_ticket(
void **state)
115 xmlNode *xml_search = NULL;
126 assert_null(xml_search);
133 duplicate_tickets(
void **state)
136 xmlNode *xml_search = NULL;
148 assert_null(xml_search);
164 cmocka_unit_test(cib_not_connected),
165 cmocka_unit_test_setup_teardown(bad_arguments, setup_test, teardown_test),
166 cmocka_unit_test_setup_teardown(unknown_ticket, setup_test, teardown_test),
167 cmocka_unit_test_setup_teardown(ticket_granted, setup_test, teardown_test),
168 cmocka_unit_test_setup_teardown(ticket_exists, setup_test, teardown_test),
169 cmocka_unit_test_setup_teardown(force_delete_ticket, setup_test, teardown_test),
170 cmocka_unit_test_setup_teardown(duplicate_tickets, setup_test, teardown_test))
#define PCMK__XE_TICKET_STATE
cib_t * cib_new(void)
Create a new CIB connection object.
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
cib_api_operations_t * cmds
int(* signon)(cib_t *cib, const char *name, enum cib_conn_type type)
int pcmk_ticket_delete(xmlNodePtr *xml, const char *ticket_id, bool force)
Delete a ticket's state from the local cluster site.
int pcmk__xml_test_setup_group(void **state)
Wrappers for and extensions to libxml2.
int(* query)(cib_t *cib, const char *section, xmlNode **output_data, int call_options)
void free_xml(xmlNode *child)
int cib__clean_up_connection(cib_t **cib)
void pcmk__cib_test_cleanup(char *out_path)
void pcmk__assert_validates(xmlNode *xml)
char * pcmk__cib_test_copy_cib(const char *in_file)