OpenDNSSEC-enforcer 2.1.13
Data Structures | Functions
test_database_operations.c File Reference
#include "config.h"
#include "../db_configuration.h"
#include "../db_connection.h"
#include "../db_object.h"
#include "CUnit/Basic.h"
#include <string.h>

Go to the source code of this file.

Data Structures

struct  test_t
 
struct  test_list_t
 
struct  test2_t
 

Functions

db_object_t__test_new_object (const db_connection_t *connection)
 
test_ttest_new (const db_connection_t *connection)
 
void test_free (test_t *test)
 
const db_value_ttest_id (const test_t *test)
 
const char * test_name (const test_t *test)
 
int test_set_name (test_t *test, const char *name)
 
int test_from_result (test_t *test, const db_result_t *result)
 
int test_get_by_name (test_t *test, const char *name)
 
int test_get_by_id (test_t *test, const db_value_t *id)
 
int test_create (test_t *test)
 
int test_update (test_t *test)
 
int test_delete (test_t *test)
 
size_t test_count_by_name (test_t *test, const char *name)
 
size_t test_count_by_id (test_t *test, const db_value_t *id)
 
test_list_ttest_list_new (const db_connection_t *connection)
 
void test_list_free (test_list_t *test_list)
 
int test_list_get (test_list_t *test_list)
 
const test_ttest_list_begin (test_list_t *test_list)
 
const test_ttest_list_next (test_list_t *test_list)
 
db_object_t__test2_new_object (const db_connection_t *connection)
 
test2_ttest2_new (const db_connection_t *connection)
 
void test2_free (test2_t *test2)
 
const db_value_ttest2_id (const test2_t *test2)
 
const char * test2_name (const test2_t *test2)
 
int test2_set_name (test2_t *test2, const char *name)
 
int test2_from_result (test2_t *test2, const db_result_t *result)
 
int test2_get_by_name (test2_t *test2, const char *name)
 
int test2_get_by_id (test2_t *test2, const db_value_t *id)
 
int test2_create (test2_t *test2)
 
int test2_update (test2_t *test2)
 
int test2_delete (test2_t *test2)
 
int clean_suite_database_operations (void)
 
void __check_id (const db_value_t *id, int id_int, const char *id_text)
 
void test_database_operations_read_object1 (void)
 
void test_database_operations_create_object2 (void)
 
void test_database_operations_read_object2 (void)
 
void test_database_operations_update_object2 (void)
 
void test_database_operations_delete_object2 (void)
 
void test_database_operations_create_object3 (void)
 
void test_database_operations_delete_object3 (void)
 
void test_database_operations_read_all (void)
 
void test_database_operations_count (void)
 
void test_database_operations_read_object1_2 (void)
 
void test_database_operations_create_object2_2 (void)
 
void test_database_operations_read_object2_2 (void)
 
void test_database_operations_update_object2_2 (void)
 
void test_database_operations_update_objects_revisions (void)
 
void test_database_operations_delete_object2_2 (void)
 
void test_database_operations_create_object3_2 (void)
 
void test_database_operations_delete_object3_2 (void)
 

Function Documentation

◆ __check_id()

void __check_id ( const db_value_t id,
int  id_int,
const char *  id_text 
)

◆ __test2_new_object()

db_object_t * __test2_new_object ( const db_connection_t connection)

Definition at line 475 of file test_database_operations.c.

◆ __test_new_object()

db_object_t * __test_new_object ( const db_connection_t connection)

Definition at line 58 of file test_database_operations.c.

◆ clean_suite_database_operations()

int clean_suite_database_operations ( void  )

Definition at line 988 of file test_database_operations.c.

References test_free().

Referenced by main().

◆ test2_create()

int test2_create ( test2_t test2)

Definition at line 666 of file test_database_operations.c.

◆ test2_delete()

int test2_delete ( test2_t test2)

Definition at line 751 of file test_database_operations.c.

◆ test2_free()

void test2_free ( test2_t test2)

Definition at line 521 of file test_database_operations.c.

◆ test2_from_result()

int test2_from_result ( test2_t test2,
const db_result_t result 
)

Definition at line 563 of file test_database_operations.c.

◆ test2_get_by_id()

int test2_get_by_id ( test2_t test2,
const db_value_t id 
)

Definition at line 626 of file test_database_operations.c.

◆ test2_get_by_name()

int test2_get_by_name ( test2_t test2,
const char *  name 
)

Definition at line 586 of file test_database_operations.c.

◆ test2_id()

const db_value_t * test2_id ( const test2_t test2)

Definition at line 539 of file test_database_operations.c.

◆ test2_name()

const char * test2_name ( const test2_t test2)

Definition at line 545 of file test_database_operations.c.

◆ test2_new()

test2_t * test2_new ( const db_connection_t connection)

Definition at line 508 of file test_database_operations.c.

◆ test2_set_name()

int test2_set_name ( test2_t test2,
const char *  name 
)

Definition at line 551 of file test_database_operations.c.

◆ test2_update()

int test2_update ( test2_t test2)

Definition at line 700 of file test_database_operations.c.

◆ test_count_by_id()

size_t test_count_by_id ( test_t test,
const db_value_t id 
)

Definition at line 365 of file test_database_operations.c.

◆ test_count_by_name()

size_t test_count_by_name ( test_t test,
const char *  name 
)

Definition at line 342 of file test_database_operations.c.

◆ test_create()

int test_create ( test_t test)

Definition at line 238 of file test_database_operations.c.

◆ test_database_operations_count()

void test_database_operations_count ( void  )

Definition at line 1187 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_create_object2()

void test_database_operations_create_object2 ( void  )

Definition at line 1059 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_create_object2_2()

void test_database_operations_create_object2_2 ( void  )

Definition at line 1210 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_create_object3()

void test_database_operations_create_object3 ( void  )

Definition at line 1131 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_create_object3_2()

void test_database_operations_create_object3_2 ( void  )

Definition at line 1317 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_delete_object2()

void test_database_operations_delete_object2 ( void  )

Definition at line 1114 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_delete_object2_2()

void test_database_operations_delete_object2_2 ( void  )

Definition at line 1300 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_delete_object3()

void test_database_operations_delete_object3 ( void  )

Definition at line 1152 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_delete_object3_2()

void test_database_operations_delete_object3_2 ( void  )

Definition at line 1338 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_read_all()

void test_database_operations_read_all ( void  )

Definition at line 1169 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_read_object1()

void test_database_operations_read_object1 ( void  )

Definition at line 1047 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_read_object1_2()

void test_database_operations_read_object1_2 ( void  )

Definition at line 1198 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_read_object2()

void test_database_operations_read_object2 ( void  )

Definition at line 1080 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_read_object2_2()

void test_database_operations_read_object2_2 ( void  )

Definition at line 1231 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_update_object2()

void test_database_operations_update_object2 ( void  )

Definition at line 1094 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_update_object2_2()

void test_database_operations_update_object2_2 ( void  )

Definition at line 1245 of file test_database_operations.c.

Referenced by main().

◆ test_database_operations_update_objects_revisions()

void test_database_operations_update_objects_revisions ( void  )

Definition at line 1265 of file test_database_operations.c.

Referenced by main().

◆ test_delete()

int test_delete ( test_t test)

Definition at line 316 of file test_database_operations.c.

◆ test_free()

void test_free ( test_t test)

Definition at line 98 of file test_database_operations.c.

Referenced by clean_suite_database_operations().

◆ test_from_result()

int test_from_result ( test_t test,
const db_result_t result 
)

Definition at line 137 of file test_database_operations.c.

◆ test_get_by_id()

int test_get_by_id ( test_t test,
const db_value_t id 
)

Definition at line 198 of file test_database_operations.c.

◆ test_get_by_name()

int test_get_by_name ( test_t test,
const char *  name 
)

Definition at line 158 of file test_database_operations.c.

◆ test_id()

const db_value_t * test_id ( const test_t test)

Definition at line 113 of file test_database_operations.c.

◆ test_list_begin()

const test_t * test_list_begin ( test_list_t test_list)

Definition at line 428 of file test_database_operations.c.

◆ test_list_free()

void test_list_free ( test_list_t test_list)

Definition at line 399 of file test_database_operations.c.

◆ test_list_get()

int test_list_get ( test_list_t test_list)

Definition at line 414 of file test_database_operations.c.

◆ test_list_new()

test_list_t * test_list_new ( const db_connection_t connection)

Definition at line 388 of file test_database_operations.c.

◆ test_list_next()

const test_t * test_list_next ( test_list_t test_list)

Definition at line 447 of file test_database_operations.c.

◆ test_name()

const char * test_name ( const test_t test)

Definition at line 119 of file test_database_operations.c.

◆ test_new()

test_t * test_new ( const db_connection_t connection)

Definition at line 86 of file test_database_operations.c.

◆ test_set_name()

int test_set_name ( test_t test,
const char *  name 
)

Definition at line 125 of file test_database_operations.c.

◆ test_update()

int test_update ( test_t test)

Definition at line 271 of file test_database_operations.c.