OpenDNSSEC-enforcer  2.1.4
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.

Referenced by test2_new().

◆ __test_new_object()

db_object_t* __test_new_object ( const db_connection_t connection)

Definition at line 58 of file test_database_operations.c.

Referenced by test_list_new(), and test_new().

◆ clean_suite_database_operations()

int clean_suite_database_operations ( void  )

◆ test2_create()

int test2_create ( test2_t test2)

◆ test2_delete()

int test2_delete ( test2_t test2)

◆ test2_free()

void test2_free ( test2_t test2)

◆ 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 
)

◆ test2_get_by_name()

int test2_get_by_name ( test2_t test2,
const char *  name 
)

◆ test2_id()

const db_value_t* test2_id ( const test2_t test2)

◆ test2_name()

const char* test2_name ( const test2_t test2)

◆ test2_new()

test2_t* test2_new ( const db_connection_t connection)

◆ test2_set_name()

int test2_set_name ( test2_t test2,
const char *  name 
)

◆ test2_update()

int test2_update ( test2_t test2)

◆ 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.

Referenced by test_database_operations_count().

◆ 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.

Referenced by test_database_operations_count().

◆ test_create()

int test_create ( test_t test)

◆ test_database_operations_count()

void test_database_operations_count ( void  )

Definition at line 1187 of file test_database_operations.c.

References test_count_by_id(), test_count_by_name(), test_free(), and test_new().

Referenced by main().

◆ test_database_operations_create_object2()

void test_database_operations_create_object2 ( void  )

◆ test_database_operations_create_object2_2()

void test_database_operations_create_object2_2 ( void  )

◆ test_database_operations_create_object3()

void test_database_operations_create_object3 ( void  )

◆ test_database_operations_create_object3_2()

void test_database_operations_create_object3_2 ( void  )

◆ test_database_operations_delete_object2()

void test_database_operations_delete_object2 ( void  )

Definition at line 1114 of file test_database_operations.c.

References test_delete(), test_free(), test_get_by_id(), and test_new().

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.

References test2_delete(), test2_free(), test2_get_by_id(), and test2_new().

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.

References test_delete(), test_free(), test_get_by_id(), and test_new().

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.

References test2_delete(), test2_free(), test2_get_by_id(), and test2_new().

Referenced by main().

◆ test_database_operations_read_all()

void test_database_operations_read_all ( void  )

◆ test_database_operations_read_object1()

void test_database_operations_read_object1 ( void  )

Definition at line 1047 of file test_database_operations.c.

References __check_id(), test_free(), test_get_by_name(), test_id(), test_name(), and test_new().

Referenced by main().

◆ test_database_operations_read_object1_2()

void test_database_operations_read_object1_2 ( void  )

◆ test_database_operations_read_object2()

void test_database_operations_read_object2 ( void  )

Definition at line 1080 of file test_database_operations.c.

References db_value_cmp(), test_free(), test_get_by_id(), test_id(), test_name(), and test_new().

Referenced by main().

◆ test_database_operations_read_object2_2()

void test_database_operations_read_object2_2 ( void  )

◆ test_database_operations_update_object2()

void test_database_operations_update_object2 ( void  )

◆ test_database_operations_update_object2_2()

void test_database_operations_update_object2_2 ( void  )

◆ test_database_operations_update_objects_revisions()

void test_database_operations_update_objects_revisions ( void  )

◆ test_delete()

int test_delete ( test_t test)

◆ test_free()

void test_free ( test_t test)

◆ 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 
)

◆ test_get_by_name()

int test_get_by_name ( test_t test,
const char *  name 
)

◆ test_id()

const db_value_t* test_id ( const test_t test)

◆ test_list_begin()

const test_t* test_list_begin ( test_list_t test_list)

Definition at line 428 of file test_database_operations.c.

Referenced by test_database_operations_read_all().

◆ test_list_free()

void test_list_free ( test_list_t test_list)

◆ test_list_get()

int test_list_get ( test_list_t test_list)

◆ test_list_new()

test_list_t* test_list_new ( const db_connection_t connection)

Definition at line 388 of file test_database_operations.c.

References __test_new_object(), and test_list_t::dbo.

Referenced by test_database_operations_read_all().

◆ test_list_next()

const test_t* test_list_next ( test_list_t test_list)

Definition at line 447 of file test_database_operations.c.

Referenced by test_database_operations_read_all().

◆ test_name()

const char* test_name ( const test_t test)

◆ test_new()

test_t* test_new ( const db_connection_t connection)

◆ test_set_name()

int test_set_name ( test_t test,
const char *  name 
)

◆ test_update()

int test_update ( test_t test)

Definition at line 271 of file test_database_operations.c.

Referenced by test_database_operations_update_object2().