24 #include "CUnit/CUnit.h" 25 #include "CUnit/Automated.h" 28 #include "libfocunit.h" 29 #include "libfodbreposysconf.h" 43 #define AGENT_DIR "../../" 50 dbManager = createTestEnvironment(AGENT_DIR,
"pkgagent", 1);
52 return dbManager ? 0 : 1;
61 dropTestEnvironment(dbManager, AGENT_DIR,
"pkgagent");
67 #if CU_VERSION_P == 213 71 {
"Testing the function RecordMetadataDEB:", NULL, NULL, (CU_SetUpFunc)PkgagentDBInit, (CU_TearDownFunc)PkgagentDBClean,
testcases_RecordMetadataDEB},
72 {
"Testing the function GetMetadataDebSource:", NULL, NULL, (CU_SetUpFunc)PkgagentDBInit, (CU_TearDownFunc)PkgagentDBClean,
testcases_GetMetadataDebSource},
73 {
"Testing the function RecordMetadataRPM:", NULL, NULL, (CU_SetUpFunc)PkgagentDBInit, (CU_TearDownFunc)PkgagentDBClean,
testcases_RecordMetadataRPM},
74 {
"Testing the function GetMetadataDebBinary:", NULL, NULL, (CU_SetUpFunc)PkgagentDBInit, (CU_TearDownFunc)PkgagentDBClean,
testcases_GetMetadataDebBinary},
75 {
"Testing the function GetMetadata:", NULL, NULL, (CU_SetUpFunc)PkgagentDBInit, (CU_TearDownFunc)PkgagentDBClean,
testcases_GetMetadata},
79 CU_SuiteInfo suites[] = {
80 {
"Testing the function GetFieldValue:", NULL, NULL, testcases_GetFieldValue},
82 {
"Testing the function RecordMetadataDEB:", PkgagentDBInit, PkgagentDBClean, testcases_RecordMetadataDEB},
83 {
"Testing the function GetMetadataDebSource:", PkgagentDBInit, PkgagentDBClean, testcases_GetMetadataDebSource},
84 {
"Testing the function RecordMetadataRPM:", PkgagentDBInit, PkgagentDBClean, testcases_RecordMetadataRPM},
85 {
"Testing the function GetMetadataDebBinary:", PkgagentDBInit, PkgagentDBClean, testcases_GetMetadataDebBinary},
91 int main(
int argc,
char *argv[] )
93 return focunit_main(argc, argv,
"pkgagent_Tests", suites) ;
char * DBConfFile
DB conf file location.
CU_TestInfo testcases_GetFieldValue[]
testcases for function GetFieldValue
CU_SuiteInfo suites[]
all test suites for delagent
char * get_dbconf()
get Db.conf path just created by create_db_repo_sysconf()
int main(int argc, char *argv[])
main test function
The main FOSSology C library.
fo_dbManager * dbManager
fo_dbManager object