17static char *cib_path = NULL;
20cib_not_connected(
void **state)
34setup_test(
void **state)
38 if (cib_path == NULL) {
46teardown_test(
void **state)
54bad_arguments(
void **state)
70 xmlNode *xml_search = NULL;
83 assert_null(xml_search);
103 assert_null(xml_search);
110remove_missing_attrs(
void **state)
114 xmlNode *xml_search = NULL;
117 attrs = g_list_append(attrs, strdup(
"XYZ"));
133 g_list_free_full(attrs, free);
138remove_existing_attr(
void **state)
142 xmlNode *xml_search = NULL;
145 attrs = g_list_append(attrs, strdup(
"owner"));
159 g_list_free_full(attrs, free);
164remove_granted_without_force(
void **state)
168 xmlNode *xml_search = NULL;
185 g_list_free_full(attrs, free);
190remove_granted_with_force(
void **state)
194 xmlNode *xml_search = NULL;
211 g_list_free_full(attrs, free);
225 cmocka_unit_test(cib_not_connected),
226 cmocka_unit_test_setup_teardown(bad_arguments, setup_test, teardown_test),
227 cmocka_unit_test_setup_teardown(no_attrs, setup_test, teardown_test),
228 cmocka_unit_test_setup_teardown(remove_missing_attrs, setup_test, teardown_test),
229 cmocka_unit_test_setup_teardown(remove_existing_attr, setup_test, teardown_test),
230 cmocka_unit_test_setup_teardown(remove_granted_without_force, setup_test, teardown_test),
231 cmocka_unit_test_setup_teardown(remove_granted_with_force, setup_test, teardown_test))
int cib__clean_up_connection(cib_t **cib)
cib_t * cib_new(void)
Create a new CIB connection object.
int pcmk_ticket_remove_attr(xmlNodePtr *xml, const char *ticket_id, GList *attr_delete, bool force)
Remove the given attribute(s) from a ticket.
int(* signon)(cib_t *cib, const char *name, enum cib_conn_type type)
int(* query)(cib_t *cib, const char *section, xmlNode **output_data, int call_options)
cib_api_operations_t * cmds
void pcmk__cib_test_cleanup(char *out_path)
int pcmk__xml_test_teardown_group(void **state)
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
int pcmk__xml_test_setup_group(void **state)
void pcmk__assert_validates(xmlNode *xml)
char * pcmk__cib_test_copy_cib(const char *in_file)
Wrappers for and extensions to libxml2.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
void pcmk__xml_free(xmlNode *xml)
#define PCMK__XE_TICKET_STATE