![]() |
FOSSology
4.7.1
Open Source License Compliance by Open Source Software
|
Unit test cases for db operations. More...
#include <testRun.h>#include <database.h>#include <scheduler.h>#include <utils.h>
Go to the source code of this file.
Functions | |
| void | test_database_init () |
| Test for database_init() More... | |
| void | test_database_exec_event () |
| Test for database_exec_event() More... | |
| void | test_database_update_event () |
| Test for database_update_event() More... | |
| void | test_database_update_job () |
| Test for database_update_job() More... | |
| void | test_database_update_event_excludes_known () |
| Test that database_update_event() excludes already-known jobs via the NOT IN clause. More... | |
| void | test_database_job () |
| Test for database_job_processed(),database_job_log(),database_job_priority() More... | |
| void | test_email_notify () |
| Test for email_notification() More... | |
Variables | |
| char | sqltmp [1024] = {0} |
| char * | check_scheduler_tables |
| char * | jobsql_processed |
| CU_TestInfo | tests_database [] |
| CU_TestInfo | tests_email [] |
Unit test cases for db operations.
Definition in file testDatabase.c.
| void test_database_exec_event | ( | ) |
Test for database_exec_event()
Definition at line 77 of file testDatabase.c.
| void test_database_init | ( | ) |
Test for database_init()
Definition at line 37 of file testDatabase.c.
| void test_database_job | ( | ) |
Test for database_job_processed(),database_job_log(),database_job_priority()
Definition at line 290 of file testDatabase.c.
| void test_database_update_event | ( | ) |
Test for database_update_event()
Definition at line 102 of file testDatabase.c.
| void test_database_update_event_excludes_known | ( | ) |
Test that database_update_event() excludes already-known jobs via the NOT IN clause.
A host with max=1 forces checkout_limit=1 (LIMIT=1 per poll). Two jobs are created: job1 at high priority (returned first) and job2 at low priority. After the first poll loads job1, the second poll must load job2 – which is only possible if job1 is excluded by the NOT IN clause. Without the clause job1 (jq_starttime IS NULL) would re-occupy the sole slot and job2 would never be fetched.
Definition at line 195 of file testDatabase.c.
| void test_database_update_job | ( | ) |
Test for database_update_job()
Definition at line 140 of file testDatabase.c.
| void test_email_notify | ( | ) |
Test for email_notification()
Definition at line 337 of file testDatabase.c.
|
extern |
Check column names for a given table
Definition at line 22 of file sqlstatements.h.
|
extern |
Update the items processed for the given job id
Definition at line 184 of file sqlstatements.h.
| CU_TestInfo tests_database[] |
Definition at line 363 of file testDatabase.c.
| CU_TestInfo tests_email[] |
Definition at line 374 of file testDatabase.c.