15 #include <scheduler.h>
43 FO_ASSERT_PTR_NULL(scheduler->
db_conn);
45 FO_ASSERT_PTR_NOT_NULL(scheduler->
db_conn);
66 FO_ASSERT_EQUAL(res, 0);
69 FO_ASSERT_EQUAL(res, 1);
86 FO_ASSERT_PTR_NULL(scheduler->
db_conn);
88 FO_ASSERT_PTR_NOT_NULL(scheduler->
db_conn);
91 FO_ASSERT_EQUAL(res, 0);
94 FO_ASSERT_EQUAL(res, -1);
112 FO_ASSERT_PTR_NULL(scheduler->
db_conn);
114 FO_ASSERT_PTR_NOT_NULL(scheduler->
db_conn);
117 FO_ASSERT_PTR_NULL(scheduler->
db_conn);
119 FO_ASSERT_PTR_NULL(scheduler->
host_url);
121 FO_ASSERT_PTR_NULL(scheduler->
sysconfig);
233 CU_TestInfo tests_scheduler[] =
void database_init(scheduler_t *scheduler)
int scheduler_daemonize(scheduler_t *scheduler)
Daemonizes the scheduler.
gint string_is_num(gchar *str)
Checks if a string is entirely composed of numeric characters.
void scheduler_sig_handle(int signo)
Handles any signals sent to the scheduler that are not SIGCHLD.
void scheduler_clear_config(scheduler_t *scheduler)
Clears any information that is loaded when loading the configuration.
scheduler_t * scheduler_init(gchar *sysconfigdir, log_t *log)
Create a new scheduler object.
int kill_scheduler(int force)
Kills all other running scheduler.
void scheduler_destroy(scheduler_t *scheduler)
Free any memory associated with a scheduler_t.
void scheduler_signal(scheduler_t *scheduler)
Function that handles certain signals being delivered to the scheduler.
int Prepare_Testing_Data(scheduler_t *scheduler)
PGconn * db_conn
The database connection.
GList * host_queue
Round-robin queue for choosing which host use next.
gchar * email_subject
The subject to be used for emails.
gchar * host_url
The url that is used to get to the FOSSology instance.
fo_conf * sysconfig
Configuration information loaded from the configuration file.
int Prepare_Testing_Data_Scheduler(scheduler_t *scheduler)
void test_scheduler_sig_handle()
Test for scheduler_sig_handle()
void test_scheduler_daemonize()
Test for scheduler_daemonize()
void test_scheduler_clear_config()
Test for scheduler_clear_config()
void test_string_is_num()
Test for string_is_num()