FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Test List
Member cliParamsTest4Mimetype::testMimetypeInDB ()
  1. Pass a file with known mimetype to the agent
  2. Check if agent return correct mimetype and id
Member cliParamsTest4Mimetype::testMimetypeNotInDB ()
  1. Pass a file with mimetype not in database to the agent
  2. Check if agent identifies correct mimetype
  3. Pass a file with mimetype in database to the agent
  4. Check if agent identifies correct mimetype
Member cliParamsTest4Ununpack::testNormalCompressedFile ()
  1. Pass Z, GZ and BZ2 files to the agent
  2. Check if the contents of files get unpacked
Member cliParamsTest4Ununpack::testNormalcpio ()
  1. Pass a CPIO file to the agent
  2. Check if the contents of file get unpacked
Member cliParamsTest4Ununpack::testNormalDsc ()
  1. Pass CAB and MSI files to the agent
  2. Check if the contents of files get unpacked
  1. Pass an DSC file to the agent
  2. Check if the contents of DSC get unpacked
Member cliParamsTest4Ununpack::testNormalEXE ()
  1. Pass a EXE file to the agent
  2. Check if the contents of file get unpacked
Member cliParamsTest4Ununpack::testNormalFsImage ()
  1. Pass ext2, ext3, fat and ntfs disk images to the agent
  2. Check if the contents of images get unpacked
Member cliParamsTest4Ununpack::testNormalIso1 ()
  1. Pass an ISO to the agent
  2. Check if it get extracted
Member cliParamsTest4Ununpack::testNormalIso2 ()
  1. Pass an ISO to the agent
  2. Check if it get extracted
Member cliParamsTest4Ununpack::testNormalJar ()
  1. Pass an RAR file to the agent compressed on windows
  2. Check if the contents of RAR get unpacked
  1. Pass the files to the agent
  2. Check if the contents of files get unpacked
  1. Pass a Jar file to the agent
  2. Check if the contents of Jar get unpacked
Member cliParamsTest4Ununpack::testNormalMultyProcess ()
  1. Pass a complex file to the agent with -m flag
  2. Check if the contents of file get unpacked
Member cliParamsTest4Ununpack::testNormalParamI ()
  1. Call agent with -i flag to initialize db
  2. Check if agent return OK
Member cliParamsTest4Ununpack::testNormalParamL ()
  1. Pass a compressed file and a log file with -L flag
  2. Check if agent extract the compressed file
  3. Check if agent write to the log file
Member cliParamsTest4Ununpack::testNormalParamr ()
  1. Pass a double compressed file to the agent with -r flag
  2. Check if the agent unpack only upto depth passed
Member cliParamsTest4Ununpack::testNormalParamx ()
  1. Pass agent a compressed file and -x flag
  2. Check if the agent removed the unpacked files
Member cliParamsTest4Ununpack::testNormalPdf ()
  1. Pass a PDF file to the agent
  2. Check if the contents of file get unpacked
Member cliParamsTest4Ununpack::testNormalRpm ()
  1. Pass an RPM file to the agent
  2. Check if the contents of RPM get unpacked
Member cliParamsTest4Ununpack::testNormalTar ()
  1. Pass an TAR file to the agent
  2. Check if the contents of TAR get unpacked
Member cliParamsTest4Ununpack::testNormalTarball ()
  1. Pass Z, GZ and BZ2 tarballs to the agent
  2. Check if the contents of files get unpacked
Member cliParamsTest4Ununpack::testNormalUpx ()
  1. Pass a UPX file to the agent
  2. Check if the contents of file get unpacked
Member cliParamsTest4Ununpack::testNormalZip ()
  1. Pass a ZIP file to the agent
  2. Check if the contents of ZIP get unpacked
Member cliParamsTest4UnunpackExcption::testNullFile ()
  1. Pass a null file to the agent (0 size)
  2. Check if agent did not try to extract the file
Member cliParamsTest4UnunpackExcption::testValidParam ()
  1. Call the ununpack agent CLI with an invalid flag
  2. Check if agent did not return OK
  3. Check if agent did not extract the package
Member cliParamsTest4Wget::test_proxy_ftp ()
  1. Set FTP Proxy
  2. Download a FTP file behind proxy
  3. Check if file was downloaded
Member cliParamsTest4Wget::test_proxy_http ()
  1. Set HTTP and NO_PROXY
  2. Download files behind proxy
  3. Check if the files are downloaded
Member cliParamsTest4Wget::test_proxy_https ()
  1. Set HTTPS proxy
  2. Download https file behind proxy
  3. Check if file downloaded
Member cliParamsTest4Wget::testDownloadAcceptRejectType1 ()
  1. Create command to download a directory
  2. Set level as 2
  3. Accept fossology*, reject few rpm files
  4. Check if other files are downloaded
  5. Check if the rpms are not downloaded
Member cliParamsTest4Wget::testDownloadDirCurrentDirLevel0 ()
  1. Create command to download a file
  2. Set level as 0
  3. Do not specify the output destination, so downloaded file under current directory
  4. Check if the file was downloaded
Member cliParamsTest4Wget::testDownloadDirHasChildDirLevel0 ()
  1. Create command to download from a directory
  2. Set level 0, accept rpm
  3. Reject few rpms
  4. Check if an rpm is downloaded
  5. Check if the rejected rpms are not downloaded
Member cliParamsTest4Wget::testDownloadDirHasChildDirLevel1 ()
  1. Create command to download a directory
  2. Set level to 1, accept rpm, reject few rpm
  3. Check if the rpm are not downloaded
  4. Check if lower level directory are not downloaded
Member cliParamsTest4Wget::testDownloadDirHasNoChildDirLevel0 ()
  1. Create command to download from a directory
  2. Set level as 0, accept deb, reject fossology-* files
  3. Check if a deb file is downloaded
  4. Check if the fossology-* files are not downloaded
Member cliParamsTest4Wget::testDownloadURLDesAbnormal ()
  1. Create command to download a file
  2. Set level as 0
Member cliParamsTest4Wget::testtDownloadAcceptRejectType2 ()
  1. Create command to download a directory
  2. Set level as 1
  3. Accept fossology-scheduler_2.0.0*, reject gz, fossology-scheduler_2.0.0-1_i386* files
  4. Check if other files are downloaded
  5. Check if rejected files are not downloaded
Member CommonCliTest::testHelp ()
  1. Call runNomos() with -h to get help message
  2. Check the output for help message
Member CopyrightScheduledTest::testRun ()
  1. Setup test tables
  2. Setup test repo
  3. Run copyright on upload id 1
  4. Remove test repo
  5. Check entries in copyright table
Member fo_RepExist (char *Type, char *Filename)
Test with standalone:
Member fo_RepExist2 (char *Type, char *Filename)
Test with standalone:
Member fo_RepGetHost (char *Type, char *Filename)
Test with standalone:
Member fo_RepMkPathTmp (const char *Type, char *Filename, char *Ext, int Which)
Test with standalone:
Member FoLibCPPTest::test_runBadCommandQueryCheckIfError ()
  1. Spawn a new DbManager.
  2. Call fo::DbManager::queryPrintf() with a corrupted statement.
  3. Check if result is a failure.
Member FoLibCPPTest::test_runCommandQueryCheckIfSuccess ()
  1. Spawn a new DbManager.
  2. Call fo::DbManager::queryPrintf() with simple statement.
  3. Check for the result.
Member FoLibCPPTest::test_runPreparedStatement ()
  1. Spawn a new DbManager.
  2. Create a prepared statement.
  3. Call fo::DbManager::execPrepared() with the newly created statement.
  4. Check for the result.
Member FoLibCPPTest::test_runSchedulerConnectConstructor ()
  1. Create a test sysconf dir with a VERSION file.
  2. Set the argv
  3. Call fo::DbManager::DbManager() with the argv.
  4. Execute a statement and check the result.
Member FoLibCPPTest::test_runSimpleQuery ()
  1. Spawn a new DbManager.
  2. Create a new table and insert some values in it.
  3. Call fo::DbManager::queryPrintf() to select new result.
  4. Check the fo::QueryResult object for row count.
  5. Check the value of fo::QueryResult::getSimpleResults().
Member FoLibCPPTest::test_tableExists ()
  1. Spawn a new DbManager.
  2. Create a new table.
  3. Call fo::DbManager::tableExists() with newly created table.
  4. Check for the result to be true.
  5. Call fo::DbManager::tableExists() with non existing table name.
  6. Check for the result to be false.
Member FoLibCPPTest::test_transactions ()
  1. Spawn a new DbManager.
  2. Create a test table.
  3. Spawn two new DbManager s.
  4. Call fo::DbManager::begin() on new managers.
  5. Insert some data using new managers.
  6. Call fo::DbManager::commit() on one manager.
  7. Call fo::DbManager::rollback() on another manager.
  8. Inserts from other manager should not be there in the table.
Member Fossology::testAreNomosMatchesInsideAMonkMatchIfFit ()
  1. Create monk license match
  2. Create nomos license match inside monk match
  3. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns true
Member Fossology::testAreNomosMatchesInsideAMonkMatchIfNoMonk ()
  1. Create nomos license match only
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false
Member Fossology::testAreNomosMatchesInsideAMonkMatchIfNoneAtAll ()
  1. Create empty license matches
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false
Member Fossology::testAreNomosMatchesInsideAMonkMatchIfNoNomos ()
  1. Create monk license matche only
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false
Member Fossology::testAreNomosMatchesInsideAMonkMatchIfNotFit ()
  1. Create monk license match
  2. Create nomos license match bigger than monk license match
  3. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false
Member Fossology::testAreNomosMonkNinkaAgreed_alsoMultiMatch ()
  1. Create monk, nomos and ninka license match
  2. Add multiple match for an agent with the same license id
  3. Test if DeciderAgent::areNomosMonkNinkaAgreed() returns true
Member Fossology::testAreNomosMonkNinkaAgreed_notIfAnyOther ()
  1. Create monk, nomos and ninka license match
  2. Add multiple match for an agent with the different license id
  3. Test if DeciderAgent::areNomosMonkNinkaAgreed() returns false
Member Fossology::testAreNomosMonkNinkaAgreed_notIfOnlyTwoOfThem ()
  1. Create monk and nomos license match only
  2. Test if DeciderAgent::areNomosMonkNinkaAgreed() returns false
Member Fossology::testDeciderMockedScanWithForceDecision ()
  1. Insert two clearing events
  2. Run DeciderJobAgent with force rule Mock
  3. Check for decisions (should exist)
  4. Check if events still exists
  5. Check if new event is created
Member Fossology::testDeciderMockedScanWithTwoEventAndNoAgentShouldMakeADecision ()
  1. Insert few clearing events
  2. Run DeciderJobAgent Mock
  3. Check for decisions (should exist)
  4. Check if events still exists
Member Fossology::testDeciderMockScanWithNoEventsAndOnlyNomosShouldNotMakeADecision ()
  1. Create findings with nomos
  2. Run DeciderJobAgent Mock
  3. Check for decisions (should not be empty)
Member Fossology::testDeciderRealScanWithForceDecision ()
  1. Insert two clearing events
  2. Run DeciderJobAgent with force rule Cli
  3. Check for decisions (should exist)
  4. Check if events still exists
  5. Check if new event is created
Member Fossology::testDeciderRealScanWithNoEventsAndOnlyNomosShouldNotMakeADecision ()
  1. Create findings with nomos
  2. Run DeciderJobAgent Cli
  3. Check for decisions (should not be empty)
Member Fossology::testDeciderRealScanWithTwoEventAndNoAgentShouldMakeADecision ()
  1. Insert few clearing events
  2. Run DeciderJobAgent Cli
  3. Check for decisions (should exist)
  4. Check if events still exists
Member Fossology::testDeciderScanWithTwoEventAndNoAgentShouldMakeADecision ()
  1. Insert two clearing events
  2. Run DeciderJobAgent
Member Fossology::testCreateCsv ()
  1. Setup test DB and insert some licenses.
  2. Call LicenseCsvExport::createCsv().
  3. Check if the file returned is correct.
  4. Test with different delimiters.
Member Fossology::testSetDelimiter ()
  1. Initialize LicenseCsvExport.
  2. Set a new delimiter using LicenseCsvExport::setDelimiter().
  3. Check if the delimiter is changed.
  4. Set a new delimiter using LicenseCsvExport::setDelimiter().
  5. Check if the delimiter is changed with only the first character passed.
Member Fossology::testSetEnclosure ()
  1. Initialize LicenseCsvExport.
  2. Set a new enclosure using LicenseCsvExport::setEnclosure().
  3. Check if the enclosure is changed.
  4. Set a new enclosure using LicenseCsvExport::setEnclosure().
  5. Check if the enclosure is changed with only the first character passed.
Member Fossology::testGetKeyFromMd5 ()
  1. Create test DB and insert a license in license_ref.
  2. Call LicenseCsvImport::getKeyFromMd5() on a known license.
  3. Check if the id matches.
  4. Call LicenseCsvImport::getKeyFromMd5() on an unknown license.
  5. Check if the return value is false.
Member Fossology::testGetKeyFromShortname ()
  1. Create test DB and insert a license in license_ref.
  2. Call LicenseCsvImport::getKeyFromShortname() on a known license.
  3. Check if the id matches.
  4. Call LicenseCsvImport::getKeyFromShortname() on an unknown license.
  5. Check if the return value is false.
Member Fossology::testHandleCsv ()
  1. Call LicenseCsvImport::handleCsv() for first time. headrow must be set.
  2. Call LicenseCsvImport::handleCsv() with sample data.
  3. Check if it is imported in nkMap
Member Fossology::testHandleCsvLicense ()
  1. Mock DB manager object.
  2. Create object of LicenseCsvImport and initialize nkMap.
  3. Call several handle calls and check the log messages.
Member Fossology::testHandleFile ()
  1. Create an empty CSV file and write a valid header.
  2. Call LicenseCsvImport::handleFile().
  3. Function must return message starting with head okay.
Member Fossology::testHandleFileIfFileIsNotParsable ()
  1. Call LicenseCsvImport::handleFile() on non-csv file
  2. Function must return Error while parsing file
Member Fossology::testHandleFileIfFileNotExists ()
  1. Call LicenseCsvImport::handleFile() on non-existing file
  2. Function must return Internal error
Member Fossology::testHandleHeadCsv ()
  1. Initialize LicenseCsvImport.
  2. Call LicenseCsvImport::handleHeadCsv() on actual header names.
  3. Check if the header returned have required keys.
  4. Call LicenseCsvImport::handleHeadCsv() on alias header names.
  5. Check if the header returned have required keys.
Member Fossology::testHandleHeadCsv_missingMandidatoryKey ()
  1. Initialize LicenseCsvImport.
  2. Call LicenseCsvImport::handleHeadCsv() on missing header names.
  3. Function must throw an Exception.
Member Fossology::testSetDelimiter ()
  1. Initialize LicenseCsvImport.
  2. Set a new delimiter using LicenseCsvImport::setDelimiter().
  3. Check if the delimiter is changed.
  4. Set a new delimiter using LicenseCsvImport::setDelimiter().
  5. Check if the delimiter is changed with only the first character passed.
Member Fossology::testSetEnclosure ()
  1. Initialize LicenseCsvImport.
  2. Set a new enclosure using LicenseCsvImport::setEnclosure().
  3. Check if the enclosure is changed.
  4. Set a new enclosure using LicenseCsvImport::setEnclosure().
  5. Check if the enclosure is changed with only the first character passed.
Member Fossology::testGetCommitsOfLastDays ()
  1. Mock CurlRequestService object and pass to RepositoryApi
  2. Get the result of RepositoryApi::getCommitsOfLastDays()
  3. Check if you receive array (key => value)
Member Fossology::testGetLatestRelease ()
  1. Mock CurlRequestService object and pass to RepositoryApi
  2. Get the result of RepositoryApi::getLatestRelease()
  3. Check if you receive array (key => value)
Member Fossology::testGetGroupId ()
  1. Set group id in session.
  2. Call UserInfo::getGroupId() and check if the id matches.
Member Fossology::testGetUserId ()
  1. Set user id in session.
  2. Call UserInfo::getUserId() and check if the id matches.
Member Fossology::testGetAllCommentsEverything ()
  1. Fetch all set and unset comments
  2. Check the length of the array matches 7
  3. Check some values
Member Fossology::testGetAllCommentsWithSkips ()
  1. Fetch all set comments only
  2. Check the length of the array matches 6
  3. Check unset comment is not in the array
Member Fossology::testGetCommentInvalid ()
  1. Call function with invalid id
  2. Check if the function throws exception
Member Fossology::testGetCommentValid ()
  1. Call function with valid id
  2. Check if the function returns string or null
  3. Check if the function returns correct value
Member Fossology::testInsertCommentAsAdmin ()
  1. Add a new comment with some value
  2. Check if the function returns integer
  3. Check if the values are actually inserted in DB
Member Fossology::testInsertCommentAsNonAdmin ()
  1. Add a new comment with some value
  2. Check if the function returns -1
Member Fossology::testInsertCommentEmptyValues ()
  1. Add a new comment with empty values
  2. Check if the function returns -1
Member Fossology::testToggleCommentAsAdmin ()
  1. Toggle the comment
  2. Check if the function returns true
  3. Check if the values are updated in DB
Member Fossology::testToggleCommentAsNonAdmin ()
  1. Toggle the comment as non admin
  2. Check if the function returns false
Member Fossology::testToggleCommentInvalidId ()
  1. Toggle the comment with bad id
  2. Check if the function throws an exception
Member Fossology::testUpdateCommentAsAdmin ()
  1. Update a comment with some value
  2. Check if the function returns true
  3. Check if the values are actually updated in DB
Member Fossology::testUpdateCommentAsAdminInvalidId ()
  1. Pass invalid comment id
  2. Check if the function throws exception
Member Fossology::testUpdateCommentAsNonAdmin ()
  1. Update a comment with some value
  2. Check if the function returns false
  3. Check if the values are not updated in DB
Member Fossology::testUpdateCommentFromArrayAsAdmin ()
  1. Set user as admin
  2. Update two comments
  3. Check if the function returns 2
  4. Check if the DB is updated
Member Fossology::testUpdateCommentFromArrayAsNonAdmin ()
  1. Set user as non admin
  2. Call function
  3. Check if the function returns false
Member Fossology::testUpdateCommentFromArrayEmptyArray ()
  1. Set user as admin
  2. Call function with empty array
  3. Check if the function returns 0
Member Fossology::testUpdateCommentFromArrayEmptyValues ()
  1. Set user as admin
  2. Call function with empty values
  3. Check if the function throws exception
Member Fossology::testUpdateCommentFromArrayInvalidFields ()
  1. Set user as admin
  2. Call function with missing fields
  3. Check if the function throws exception
Member Fossology::testUpdateCommentFromArrayInvalidId ()
  1. Set user as admin
  2. Call function with invalid data
  3. Check if the function throws exception
Member Fossology::testReport ()
  1. Generate report an upload
  2. Check if the DB is updated with new value
  3. Check if report file is created
  4. Check if report file size is close to test report
Member Fossology::testReuserMockedScanWithALocalClearing ()
  1. Create an upload with clearing decisions on files
  2. Run reuser on the upload new upload with mock agent
  3. Check if clearing decisions are added
  4. Check if the clearing decisions have new ids
  5. Check the clearing type and scope are retained
  6. Check the upload tree id of the clearing decision
Member Fossology::testReuserMockedScanWithARepoClearing ()
  1. Create an upload with license clearing done
  2. Run reuser with mock agent
  3. Check if new upload has clearings
  4. Reuser should have not created a new clearing decision and reuse them
  5. Decision types and scopes are same
  6. Reuser should have not created a correct local event history
Member Fossology::testReuserMockedScanWithoutAnyUploadToCopyAndAClearing ()
  1. Run reuser on the empty upload with agent mock
  2. Check that no clearing decisions added by reuser
Member Fossology::testReuserMockedScanWithoutAnyUploadToCopyAndNoClearing ()
  1. Setup an upload with no clearing decisions
  2. Run reuser on the empty upload with mock agent
  3. Check that no clearing decisions added by reuser
Member Fossology::testReuserRealScanWithALocalClearing ()
  1. Create an upload with clearing decisions on files
  2. Run reuser on the upload new upload with scheduler cli
  3. Check if clearing decisions are added
  4. Check if the clearing decisions have new ids
  5. Check the clearing type and scope are retained
  6. Check the upload tree id of the clearing decision
Member Fossology::testReuserRealScanWithARepoClearing ()
  1. Create an upload with license clearing done
  2. Run reuser with scheduler cli
  3. Check if new upload has clearings
  4. Reuser should have not created a new clearing decision and reuse them
  5. Decision types and scopes are same
  6. Reuser should have not created a correct local event history
Member Fossology::testReuserRealScanWithARepoClearingEnhanced ()
  1. Create an upload with license clearing done
  2. Create an upload with files with small difference
  3. Run reuser with mock agent
  4. Check if new upload has clearings
  5. Reuser should have not created a new clearing decision and reuse them
  6. Decision types and scopes are same
  7. Reuser should have not created a correct local event history
Member Fossology::testReuserRealScanWithoutAnyUploadToCopyAndAClearing ()
  1. Run reuser on the empty upload with scheduler cli
  2. Check that no clearing decisions added by reuser
Member Fossology::testReuserRealScanWithoutAnyUploadToCopyAndNoClearing ()
  1. Setup an upload with no clearing decisions
  2. Run reuser on the empty upload with scheduler cli
  3. Check that no clearing decisions added by reuser
Member Fossology::testAddPrefixOnDemandNoChecker ()
  1. Call addPrefixOnDemand() with no check
  2. Check if original string is returned
Member Fossology::testPreWorkOnArgsFlpId ()
  1. Create args array with only key1
  2. Call preWorkOnArgsFlp() with key1 and key2
  3. Check if args array is not modified
Member Fossology::testPreWorkOnArgsFlpRealWork ()
  1. Create args array with key1 containing --key2= as a value
  2. Call preWorkOnArgsFlp() with key1 and key2
  3. Check if array with proper assignment is returned
Member Fossology::testPreWorkOnArgsFlpZero ()
  1. Create empty args array
  2. Call preWorkOnArgsFlp()
  3. Check if empty array is returned
Member Fossology::runAndTestReportRDF ($uploadId=1)
  1. Run job from queue runJobFromJobque()
  2. Get the report path
  3. Check if report contains a known string
  4. Check if report does not contain emails
  5. Verify RDF format
Member ft_cliDelagentTest::testDelagentf ()
  1. Load test db
  2. Get a folder name
  3. Call delagent cli with -f flag
  4. Check if folder name matches
Member ft_cliDelagentTest::testDelagentu ()
  1. Prepare testdb.
  2. Get the Upload id and filename for a upload.
  3. Call delagent cli with -u flag
  4. Check if the upload id and filename matches.
Member ft_cliDelagentTest::testDelagentUpload ()
  1. Setup test db
  2. Call delagent cli with -U flag to delete an upload
  3. Check if the upload got deleted
Member ft_cliPkgagentTest::testHelp ()
  1. Call -h on pkgagent CLI
  2. Check if help message was printed properly
Member ft_cliPkgagentTest::testI ()
  1. Call -i on pkgagent CLI
  2. Check if agent ran properly
Member ft_cliPkgagentTest::testOneRPM ()
  1. Call CLI with single RPM file path
  2. Check if agent parse the RPM file properly
Member ft_cliPkgagentTest::testOneRPMV ()
  1. Pass one RPM to CLI with -vv flag
  2. Test if extra information is loaded
Member ft_DelagentTest::test_delagentu ()
  1. Get the Upload id and filename for a upload.
  2. Call delagent cli with -u flag
  3. Check if the upload id and filename matches.
Member ft_DelagentTest::test_delagentu_wronguser ()
  1. Get the Upload id and filename for a upload.
  2. Call delagent cli with -u flag but wrong user
  3. Check that upload id and filename should not match.
Member main (int argc, char **argv)
  1. Load the files passed using fo_config_load()
  2. Join all the config files using fo_config_join()
  3. Print the group names using fo_config_group_set()
  4. Print all the list elements in the group using fo_config_get_list() or fo_config_get()
Member NomosFunTest::testDiffNomos ()
  1. Run nomos on every test file inside testdir and save result in a file
  2. Read the testdata/LastGoodNomosTestfilesScan file to load previous results
  3. Check the difference in last results and new results
  4. If there is a difference, fail the test.
Member OjoScheduledTest::regressionTest ()
  1. Run ojo on a test directory
  2. Check if ojo returns a JSON
  3. Check if the returned JSON matches last run
Member OjoScheduledTest::testCli ()
  1. Run ojo on a test file
  2. Check if ojo returns a JSON
  3. Check if the returned JSON contains correct data
Member OjoScheduledTest::testRun ()
  1. Setup test tables
  2. Setup test repo
  3. Run ojo on upload id 4
  4. Remove test repo
  5. Check entries in license_file table
Member OneShotafferoTest::testOneShotafferos ()
  1. Check if required license files exists
  2. Run nomos on the license files and record the output
  3. Check if the correct license is matched for a given affero license
Member OneShotbsdTest::testOneShotBsd ()
  1. Check if required license files exists
  2. Run nomos on the license files and record the output
  3. Check if the correct license is matched on the intended file
Member OneShotbsdTest::testOneShotDnsdigest ()
  1. Check if required license files exists
  2. Run nomos on the license files and record the output
  3. Check if the correct license is matched on the intended file
Member OneShotemptyTest::testOneShotempty ()
  1. Check if required empty file exists
  2. Run nomos on the file and record the output
  3. Check if the output says No_license_found
Member OneShotgpl3Test::testOneShotgplv3 ()
  1. Check if required GPL license file exists
  2. Run nomos on the license and record the output
  3. Check if the output says GPL-3.0
Member OneShotgplv21Test::testOneShotgplv21 ()
  1. Check if required license file exists
  2. Run nomos on the file and record the output
  3. Check if the output says LGPL-2.1
Member OneShotJSON::testOneShot_JSON ()
  1. Check if required file exists
  2. Run nomos on the file and record the output
  3. Check if the output says JSON
Member OneShotMultiFileTest::testOneShotmultiFile ()
  1. Get the location of test files
  2. Run NOMOS on the test files and record the output
  3. For every result output, check if the file is in $Results array
  4. For every result output, match it using the $Results map
Member OneShotnoneTest::testOneShotnone ()
  1. Get the location of test file
  2. Run NOMOS on the test file and record the output
  3. Check if the output says No_license_found
Member OneShotOracleBerkeleyDB::testOneShotOracle_Berkeley_DB ()
  1. Get the location of test files
  2. Run NOMOS on the test files and record the output
  3. Check if the nomos records Oracle-Berkeley-DB and Sleepycat license
Member regexConfProviderTestSuite::multipleReplacementTest ()
  1. Create test stream with multiple pairs
  2. Check with regexConfProviderTest()
Member regexConfProviderTestSuite::regexConfProviderTest (istringstream &testStream, const string &testString, const string &testKey)
  1. Create new RegexConfProvider
  2. Load test data from testStream
  3. Get data using testKey and compare against testString
Member regexConfProviderTestSuite::simpleReplacementTest ()
  1. Create test stream with key inside value
  2. Check with regexConfProviderTest()
Member regexConfProviderTestSuite::simpleTest ()
  1. Create simple test stream with 'key=value'
  2. Check with regexConfProviderTest()
Member regexConfProviderTestSuite::testForInfiniteRecursion ()
  1. Create ambiguous test stream
  2. Load in RegexConfProvider
  3. Try to retrieve value
Member regexTest::badNameTest (void)
  1. Create a test SPDX identifier string with bad license identifier
  2. Load the regex patterns
  3. Run the regex on the string
  4. Check the actual number of matches against expected result
  5. Check the actual findings matches the expected licenses
Member regexTest::regTest (void)
  1. Create a test string
  2. Create a regex pattern
  3. Run the regex on the string
  4. Check the actual number of matches against expected result
  1. Create a test SPDX identifier string
  2. Load the regex patterns
  3. Run the regex on the string
  4. Check the actual number of matches against expected result
  5. Check the actual findings matches the expected licenses
Member scannerTestSuite::cleanEntries ()
  1. Load test data and expected data
  2. Generate matches to clean each line in the file
  3. Call cleanMatch() to clean each line
  4. Check if cleaned test data matches expected data
Member scannerTestSuite::copyscannerTest ()
  1. Create a copyright scanner
  2. Load test data and expected data
  3. Test using scannerTest()
Member scannerTestSuite::multiSpdxContentTest ()
  1. Create an OjoAgent object
  2. Load test data with multiple SPDX license and expected data
  3. Test using scannerTest()
Member scannerTestSuite::nonSpdxContentTest ()
  1. Create an OjoAgent object
  2. Load test data without SPDX license and expected data
  3. Test using scannerTest()
Member scannerTestSuite::regAuthorTest ()
  1. Create a author scanner
  2. Load test data and expected data
  3. Test using scannerTest()
Member scannerTestSuite::regEccTest ()
  1. Create a ECC scanner
  2. Load test data and expected data
  3. Test using scannerTest()
Member scannerTestSuite::regEmailTest ()
  1. Create a email scanner
  2. Load test data and expected data
  3. Test using scannerTest()
Member scannerTestSuite::regKeywordTest ()
  1. Create a keyword scanner
  2. Load test data and expected data
  3. Test using scannerTest()
Member scannerTestSuite::regUrlTest ()
  1. Create a URL scanner
  2. Load test data and expected data
  3. Test using scannerTest()
Member scannerTestSuite::spdxContentTest ()
  1. Create an OjoAgent object
  2. Load test data and expected data
  3. Test using scannerTest()
Member signal_connect_end ()
Since the fo_scheduler_next() function will block until either a "CLOSE\\n" or a non-command message is sent a signal is needed to test the intermediate state of the connection. This will check that the "END\\n" command left the connection in the correct state and then send a "CLOSE\\n" command so that fo_scheduler_next() will return in the main thread.
Member signal_connect_verbose ()
  1. Check the agent_verbose at begin
  2. Update the verbose value
Member signal_connect_version ()
  1. Read from the scheduler connection
  2. Check the version string with COMMIT_HASH
Member test_10_compressDoctoredBuffer ()
  1. garbage collect: eliminate all INVISIBLE characters in the buffer
Member test_1_removeHtmlComments ()
Step 1: take care of embedded HTML/XML and special HTML-chars like " and   – but DON'T remove the text in an HTML comment. There might be licensing text/information in the comment!
Member test_2_removeLineComments ()
Step 2: remove comments that start at the beginning of a line, * like ^dnl, ^xcomm, ^comment, and //
Member test_3_cleanUpPostscript ()
Step 3 - strip out crap at end-of-line on postscript documents
Member test_4_removeBackslashesAndGTroffIndicators ()
Step 4: remove groff/troff font-size indicators, the literal string backslash-n and all backslahes, ala: ==> `perl -pe 's,\s[+-][0-9]*,,g;s,\s[0-9]*,,g;s/\n//g;' |f`
Member test_5_convertWhitespaceToSpaceAndRemoveSpecialChars ()
Step 5: convert white-space to real spaces, and remove unnecessary punctuation, ala: ==> `tr -d '*=+#$|%.,:;!?()\][\140\047\042' | tr '\011\012\015' ' '`
Member test_6_dehyphen ()
  1. Create dirty string with hyphens
  2. Call dehyphen() on the dirty string
  3. Check if the string is cleaned
Member test_6a_dehyphen ()
  1. Create a string with mix of hyphens and INVISIBLE
  2. Call dehyphen() and check the result
Member test_7_removePunctuation ()
Step 6: clean up miscellaneous punctuation, ala: ==> perl -pe 's,[-_/]+ , ,g;s/print[_a-zA-Z]* //g;s/ / /g;'
Member test_8_ignoreFunctionCalls ()
Ignore function calls to print routines: only concentrate on what's being printed (sometimes programs do print licensing information) – but don't ignore real words that END in 'print', like footprint and fingerprint. Here, we take a risk and just look for a 't' (in "footprint"), or for an 'r' (in "fingerprint"). If someone has ever coded a print routine that is named 'rprint' or tprint', we're spoofed.
Member test_9_convertSpaceToInvisible ()
  1. Create string with many empty spaces
  2. Call convertSpaceToInvisible()
  3. Check if all spaces (>2) are replaced with INVISIBLE
Member test_add_meta_agent ()
  1. Call add_meta_agent() with appropriate parameters, should return true
  2. Call add_meta_agent() with false parameters, should return false
  3. check if the meta agent is added to the list and contains proper values
Member test_agent_create_event ()
  1. Create a meta agent and add to the scheduler calling agent_create_event()
  2. Check if the agent for added to the scheduler and is running
  3. Call agent_pause() and agent_unpause() and check if the agent status changes
  4. Call agent_ready_event() and check if the agent status updated
  5. Call agent_fail_event() and check if the agent status updated
  6. Call agent_update_event() and check if the agent status is not updated
  7. Call agent_death_event() and check if the agent status is failed and agent is removed from scheduler
Member test_agent_death_event ()
  1. Create an agent
  2. Add to the scheduler
  3. Call agent_death_event()
  4. Check if the agent is removed from the scheduler
Member test_Archivefs_dir ()
  1. Create a directory with a file
  2. Call Archivefs()
  3. Check if the result is a tar archive
Member test_Archivefs_file ()
  1. Create a test file
  2. Call Archivefs()
  3. Check if the result is normal file
Member test_collapseInvisible ()
  1. Create a string with INVISIBLE characters
  2. Call collapseInvisible()
  3. Check if the string is collapsed with getPairPosOff()
Member test_collapseSpaces ()
  1. Create a string with spaces
  2. Call collapseSpaces()
  3. Check if the string is collapsed with getPairPosOff()
Member test_database_exec_event ()
  1. Initialize database and call database_exec_event()
Member test_database_init ()
  1. Call database_init() with a scheduler
  2. Check if the required tables with required columns are created
Member test_database_job ()
  1. Initialize test database
  2. Create a mock job
  3. Call database_job_processed() to update items processed
  4. Call database_job_log() to create a test log
  5. Call database_job_priority() to update job priority
Member test_database_update_event ()
  1. Initialize test database
  2. Call database_update_event()
  3. Check if new jobs are added to the queue with proper names
  4. Reset the queue
Member test_database_update_job ()
  1. Initialize test database
  2. Create a mock job
  3. Check the job status
  4. Call database_update_job() to update the job status
  5. Check if the job status is not changed for the structure but updated in DB
Member test_doctorBuffer ()
  1. Create a dirty string
  2. Initialize scanner and call doctorBuffer() on dirty string
  3. Check if the string is sanitized
Member test_doctorBuffer_fromFile ()
  1. Load a license info from a file
  2. Add license to the current matches
  3. Call idxGrep_recordPosition() to match license regex
  4. Call report_Match() to verify the match
Member test_doctorBuffer_uncollapse ()
  1. Create a dirty string
  2. Initialize scanner and call doctorBuffer() on dirty string
  3. Check if uncollapsePosition() refers to original position
Member test_email_notify ()
  1. Initialize scheduler, DB and email
  2. Create a job and update status using database_update_job()
  3. Check if job checkedout by email
Member test_event_init ()
  1. Call event_init() with appropriate values to create an event
  2. Check if the event created have appropriate values
Member test_event_loop_enter ()
  1. Generate several events using event_signal()
  2. Get the return value from event_loop_enter() with sample_callback as argument
  3. Check the return value and count of callback calls
Member test_event_loop_get ()
  1. Check if no event loop is created
  2. Get the vl_addr and call event_loop_get()
  3. Check if vl_addr and event loop are equal
  4. Check if event loop is created and is not occupied or terminated
  5. Call event_loop_get() one more time
  6. Check if value return matches previous values
Member test_event_loop_put ()
  1. Pass sample_event and sample_args to event_signal()
  2. Check if the event loop gets the values in the queue
  3. Call event_loop_put()
Member test_event_loop_take ()
  1. Get an event_loop from event_loop_get()
  2. Set the occupied and terminated values for the event_loop
  3. Pass the event_loop to event_loop_take()
  4. Check the return value is NULL
Member test_event_loop_terminate ()
  1. Call event_signal() with terminate_event() callback
  2. Get the return value from event_loop_enter() with NULL as the parameters
  3. Check the return value is 0x0
  4. Check if the occupied is false for event_loop
  5. Check if terminated is true for event_loop
Member test_event_signal ()
  1. Use the macro event_signal() to create an event
  2. Get the new event from event loop
  3. Check if the event get the name "sample_event" and have proper function and argument assigned
Member test_event_signal_ext ()
  1. Call event_signal_ext() with appropriate values to create an event
  2. Check if the event created have appropriate values
Member test_fo_config_free ()
  1. Call fo_config_free() on test data
  2. Check if everything is freed/NULLed
Member test_fo_config_get ()
  1. Test fo_config_get() for known group and keys
  2. Call fo_config_get() on missing group/keys and check the error returned
Member test_fo_config_get_list ()
Tests a none list key, and the index being out of the valid range.
Member test_fo_config_group_set ()
  1. Get the group set for the test data using fo_config_group_set()
  2. Check if the group names returned match the actual names
Member test_fo_config_has_group ()
  1. Check fo_config_has_group() on test data for TRUE and FALSE conditions
Member test_fo_config_has_key ()
There are three cases here because there are two ways that a config can not have a key. If the key isn't in the group or the group doesn't exist
Member test_fo_config_is_list ()
Tests groups that has both and a group that doesn't have a list. Error cases are tested elsewhere.
Member test_fo_config_key_set ()
  1. From the test data, get the key list using fo_config_key_set() for each group
  2. Check if the key values match
Member test_fo_config_list_length ()
Checks both lists in the test file and tests a none-list key error
Member test_fo_config_load ()
This should check all of the error conditions using different configuration files as will as a successful load. It is important to note that if the fo_config_load of the valid configuration file fails, all following test cases will fail as a result. Because of this, a failure here will cause a fatal abort of testing.
Member test_fo_tableExists ()
  1. Check for an existing table
  2. Check for table that does not exist
  3. Check for a non table entities (sequence, constraint, ...)
Member test_get_host ()
  1. Initialize the scheduler using scheduler_init()
  2. Add hosts to the scheduler with different capacity using host_insert()
  3. Get the hosts from scheduler using get_host.
  4. Check the name of the host for a given capacity
Member test_GetFieldValue_normal ()
  1. Create a string with field=value format
  2. Call GetFieldValue() with a separator
  3. Check if the value string is parsed properly
Member test_GetFieldValue_noseparator ()
  1. Create a string with field=value format
  2. Call GetFieldValue() with separator as NULL
  3. Check if field and value are not separated
Member test_GetFieldValue_sin_is_null ()
  1. Create an empty string
  2. Pass to GetFieldValue()
  3. Check if value string returned is NULL
Member test_GetMetadata_no_testfile ()
  1. Pass NULL to GetMetadata() for pkg
  2. Function should return -1
Member test_GetMetadata_normal ()
  1. Load a known RPM package using GetMetadata()
  2. Check if the meta data are parsed properly
Member test_GetMetadata_wrong_testfile ()
  1. Load a Debian package using GetMetadata()
  2. The function should return -1
Member test_GetMetadataDebBinary ()
  1. Load a test file in database
  2. Pass test file id to GetMetadataDebBinary()
  3. Check if meta data is parsed properly
Member test_GetMetadataDebBinary_no_uploadpk ()
  1. Pass 0 to GetMetadataDebBinary() as upload_pk
  2. Check if function return -1
Member test_GetMetadataDebSource ()
  1. Pass Debian source ".dsc" to GetMetadataDebSource()
  2. Check if meta data parsed properly
Member test_GetMetadataDebSource_wrong_testfile ()
  1. Pass wrong file to GetMetadataDebSource()
  2. Check if function return -1
Member test_host_decrease_load ()
  1. Initialize host using host_init()
  2. Set the host load to 2
  3. Call host_decrease_load() on the host
  4. Check if the running agents on host are decreasing
Member test_host_increase_load ()
  1. Initialize host using host_init()
  2. Check the running agents on host are 0
  3. Call host_increase_load() on the host
  4. Check if the running agents on host are increasing
Member test_host_init ()
  1. Create a host using host_init()
  2. Check if the host returned is not NULL
  3. Check if the host gets name, address, agent_dir and max properly
  4. Check if the host has no running agents
  5. Destroy the host
Member test_host_insert ()
  1. Initialize scheduler using scheduler_init()
  2. Create a host using host_init()
  3. Insert the host to the scheduler using host_insert()
  4. Check if scheduler's host list and queue size increases
  5. Verify if the hosts are added in the given order to the scheduler's host queue
Member test_interface_destroy ()
  1. Initialize scheduler using scheduler_init()
  2. Destroy interface on the scheduler using interface_destroy() multiple times
  3. Check the scheduler for
    1. i_created as FALSE
    2. i_terminate as FALSE
Member test_interface_init ()
  1. Initialize scheduler using scheduler_init()
  2. Initialize interface on the scheduler using interface_init()
  3. Check the scheduler for
    1. i_created as TRUE
    2. i_terminate as FALSE
    3. server as not NULL
    4. workers as not NULL
    5. cancel as not NULL
  4. Destroy the scheduler and interface
Member test_interface_listen_thread ()
  1. Initialize scheduler using scheduler_init()
  2. Set scheduler's i_terminate and i_created to TRUE and call interface_listen_thread()
  3. Check for the result
  4. Set scheduler's i_terminate and i_created to FALSE and call interface_listen_thread()
  5. Check for the result
Member test_interface_pool ()
  1. Initialize scheduler using scheduler_init()
  2. Initialize interface using interface_init()
  3. Check the pool's max threads equals the value set in fossology.conf
  4. Check the unprocessed workers in pool is 0
  5. Connect to the scheduler port and check if result is TRUE
Member test_job_event ()
  1. Initialize scheduler and database
  2. Create new database_update_event() to load data
  3. Get the job from scheduler and call
    1. job_verbose_event() and check if job is updated
    2. job_pause_event() and check if job is paused
    3. job_restart_event() and check if job is restarted
    4. job_priority_event() and check if job is restarted
    5. job_fail_event() and check if job is failed
Member test_job_fun ()
  1. Initialize scheduler and database
  2. Create new database_update_event() to load data
  3. Get the job from scheduler and call
    1. job_next() and check the job queue id
    2. next_job() and check the job is NOT NULL and its id is 1
    3. peek_job() and check the job is NOT NULL and its id is 1
    4. active_jobs() and check the result is 0
Member test_meta_agent_init ()
  1. Call meta_agent_init() with appropriate parameters
  2. Check if the meta_agent_t returned is not null
  3. Check if agent have appropriate name, max_run, special values, version raw_cmd and is assigned valid
  4. Call meta_agent_init() with NULL name, should return null
  5. Call meta_agent_init() with NULL command, should return null
Member test_PathCheck ()
  1. Create a path string with "%H"
  2. Call PathCheck
  3. Check if "%H" was replaced with HostName
Member test_ProcessUpload ()
  1. Create a test entry in database for an upload
  2. Call ProcessUpload() on the upload
  3. Check if run was success
Member test_RecordMetadataDEB ()
  1. Create a test upload in pfile table
  2. Create debpkginfo object and populate it
  3. Call RecordMetadataDEB()
  4. Check if meta data got inserted in DB
Member test_RecordMetadataRPM ()

  1. Create a test upload in pfile table
  2. Create rpmpkginfo object and populate it
  3. Call RecordMetadataRPM()
  4. Check if meta data got inserted in DB
Member test_scheduler_clear_config ()
  1. Initialize scheduler and database
  2. Call scheduler_clear_config()
  3. Check for config pointers to be NULL
Member test_scheduler_connect ()
Tests calling an fo_scheduler_connect() in a situation where it will create a connection to the scheduler. This will pass --scheduler_start as a command line arg to fo_scheduler_connect(). The alarm, sleep and following assert check that the heart beat was correctly created.
Member test_scheduler_current ()
  1. Send CLOSE\n to the scheduler
  2. Check if fo_scheduler_next() and fo_scheduler_current() returns NULL
Member test_scheduler_daemonize ()
  1. Initialize scheduler and database
  2. Call scheduler_daemonize(), the return should be OK
  3. Call kill_scheduler(), the return should be -1
Member test_scheduler_disconnect ()
  1. Call fo_scheduler_disconnect()
  2. Check if scheduler returns BYE #\n
Member test_scheduler_heart ()
  1. Send heart beat 1 using fo_scheduler_heart() and check if items_processed is updated.
  2. Send heart beat 10 and check if items_processed is updated with 11.
  3. Send SIGALRM and check if scheduler returns HEART: 11.
Member test_scheduler_next_close ()
  1. Send CLOSE\n to the scheduler
  2. Call fo_scheduler_next().
  3. Check if NULL is returned.
Member test_scheduler_next_end ()
  1. Send END\n to the scheduler
  2. Send a SIGALRM
  3. Call fo_scheduler_next().
  4. Check if NULL is returned.
Member test_scheduler_next_oth ()
Send a non-command to the stdin for the scheduler next function. Unlike the other scheduler next test functions, this does not need to setup a signal since fo_scheduler_next() will return without any extra commands.
Member test_scheduler_next_verbose ()
  1. Send VERBOSE #\n to the scheduler
  2. Send a SIGALRM
  3. Call fo_scheduler_next().
  4. Check if NULL is returned.
Member test_scheduler_next_version ()
  1. Send VERSION\n to the scheduler
  2. Send a SIGALRM
  3. Call fo_scheduler_next().
  4. Check if NULL is returned.
Member test_scheduler_no_connect ()
Tests calling an fo_scheduler_connect() in a situation where it wouldn't create a connection to the scheduler. This will not pass --scheduler_start as a command line arg to fo_scheduler_connect()
Member test_scheduler_sig_handle ()
  1. Initialize scheduler and database
  2. Call scheduler_sig_handle() and scheduler_signal()
Member test_sending_agents ()
  1. Initialize scheduler and interface
  2. Create a socket connection to scheduler
  3. Send valid agent message on the interface (pause <job id>)
  4. Check for the result on socket which should contain
    received and a new event list_agents_event should be triggered
Member test_sending_close ()
  1. Initialize scheduler and interface
  2. Create a socket connection to scheduler
  3. Send close message on the interface
  4. Check for the result on socket which should contain
    recieved\nCLOSE
Member test_sending_kill ()
  1. Initialize scheduler and interface
  2. Create a socket connection to scheduler
  3. Send invalid kill message on the interface
  4. Check for the result on socket which should contain
    received\nInvalid kill command: <kill message>
  5. Send valid kill message on the interface
  6. Check for the result on socket which should contain
    received and queue length should decrease
Member test_sending_load ()
  1. Initialize scheduler and interface
  2. Create a socket connection to scheduler
  3. Send load message on the interface
  4. Check for the result on socket which should contain
    received\nhost:<host> address:<address> max:<max> running:0\nend
Member test_sending_pause ()
  1. Initialize scheduler and interface
  2. Create a socket connection to scheduler
  3. Send invalid pause message on the interface
  4. Check for the result on socket which should contain
    received\nInvalid pause command: <pause message>
  5. Send valid pause message on the interface (pause <job id>)
  6. Check for the result on socket which should contain
    received and queue length should decrease
Member test_sending_reload ()
  1. Initialize scheduler and interface
  2. Create a socket connection to scheduler
  3. Send valid reload message on the interface (pause <job id>)
  4. Check for the result on socket which should contain
    received and a new event scheduler_config_event should be triggered
Member test_string_is_num ()
  1. Call string_is_num() on a text, the return should be 0 (FALSE)
  2. Call string_is_num() on a number, the return should be 1 (TRUE)
Member test_Trim_allspace ()
  1. Create a string with only spaces
  2. Call trim()
  3. Check if empty string is returned
Member test_Trim_normal ()
  1. Create a string with extra spaces both ends
  2. Call trim()
  3. Check if the extra space were removed
Member test_Trim_str_is_null ()
  1. Create an empty string
  2. Call trim()
  3. Check if entry string is returned
Member test_uncollapseInvisible ()
  1. Create a string with INVISIBLE characters
  2. Call collapseInvisible()
  3. Check if the string can be uncollapsed by calling uncollapsePosition()
Member test_uncollapseSpaces ()
  1. Create a string with spaces
  2. Call collapseSpaces()
  3. Check if the string can be uncollapsed by calling uncollapsePosition()
Member testCheckMimeTypes ()
  1. Clear mimetype for bin extension in mimetype table
  2. Get mimetype id for bin extension from CheckMimeTypes()
  3. Check if the return id matched DB id
  4. Check for one more extension
Member testCopyFileAbnormal ()
  1. Call CopyFile() on an empty Src
  2. Check if function returns 1
  3. Check if function did not do anything
Member testCopyFileNormalDir ()
  1. Call CopyFile() to copy directory
  2. Check if the function returns 1
  3. Check if a file under Src is not copied to Dst
Member testCopyFileNormalFile ()
  1. Add a new directory to Dst
  2. Call CopyFile() to copy a file from Src to Dst
  3. Check if file was copied to new directory
Member testCountDigits ()
  1. Call CountDigits() with a number
  2. Check if function returned actual count
Member TestDataCheck::testDataCheck ()
  1. Load test files from ../testdata/ directory and run copyright and author scanners on them.
  2. Merger the results from both scanners
  3. Check the results against "_raw" results of each input file
Member testDBCheckFileExtention ()
  1. For a given file, check if DBCheckFileExtention() returns correct mimetype id
Member testDBCheckMime ()
  1. Load a C file in database
  2. Pass a C file to DBCheckMime()
  3. Check if the mimetype from DB matches
Member testDBFindMime ()
  1. Create one new entry from mimetype table
  2. Get the mimetype id from DBFindMime() for the inserted type
  3. Check if the value returned from function matches the actual id
  4. Call DBFindMime() on a type which does not exists in DB
  5. Check if -1 is returned
Member testDBInsertPfile ()
  1. Call DBInsertPfile() with a sample ContainerInfo
  2. Check if function returns OK
Member testDBInsertUploadTree ()
  1. Call DBInsertUploadTree() with sample ContainerInfo
  2. Check if function return OK
Member testDBLoadGold ()
  1. Call DBLoadGold()
  2. Get the data from pfile table
  3. Check if the file exists in file system
Member testDBLoadMime ()
  1. Call DBLoadMime()
  2. Check if MaxDBMime equals actual count in mimetype table
Member testDebugContainerInfo ()
  1. Create a test ContainerInfo object
  2. Pass it to DebugContainerInfo()
Member testDeleteFolders ()
  1. Give a folder id to deleteFolder()
  2. Check for return code
Member testDeleteUploads ()
  1. Delete an upload using deleteUpload() and check for the return
  2. Check if the upload is delete from database
  3. Check if the copyrights for the given upload is also deleted
Member testExtractAR4ArchiveLibraryFile ()
  1. Try to extract .ar library file using ExtractAR()
  2. Check if the files are unpacked
Member testExtractAR4DebFile ()
  1. Try to extract .deb archives using ExtractAR()
  2. Check if the files are unpacked
Member testExtractAR4EmptyParameters ()
  1. Call ExtractAR() with empty parameters
  2. Check if the function return NOT OK
Member testExtractAR4ErrorParameters ()
  1. Try to extract .rpm archives using ExtractAR()
  2. Check if the function return NOT OK
Member testExtractDisk4Ext2 ()
  1. Try to extract ext2 fs images using ExtractDisk()
  2. Check if the files are unpacked
Member testExtractDisk4Ext2FstypeUnknow ()
  1. Try to extract ext2 fs images using ExtractDisk() with empty FStype
  2. Check if function returns NOT OK
  3. Check if function has not unpacked the files
Member testExtractDisk4Ext3 ()
  1. Try to extract ext3 fs images using ExtractDisk()
  2. Check if the files are unpacked
Member testExtractDisk4Fat ()
  1. Try to extract fat fs images using ExtractDisk()
  2. Check if the files are unpacked
Member testExtractDisk4Ntfs ()
  1. Try to extract ntfs fs images using ExtractDisk()
  2. Check if the files are unpacked
Member testExtractISO ()
  1. Pass an ISO to ExtractISO()
  2. Check if function returns 0 and files are unpacked
Member testExtractISO4EmptyParameters ()
  1. Pass an empty strings to ExtractISO()
  2. Check if function returns 1
Member testExtractISO4ErrorParameters ()
  1. Pass a non ISO to ExtractISO()
  2. Check if function returns 1 and files are not unpacked
Member testFatDiskName1 ()
  1. Pass a string with upper case letters to FatDiskName()
  2. Check if the string is returned in lower case
Member testFatDiskName2 ()
  1. Pass a string with upper case letters to FatDiskName()
  2. Check if the string is returned in lower case
  3. Pass a string with upper case letters and spaces to FatDiskName()
  4. Check if the string is returned in lower case with spaces in place
Member testFatDiskName3 ()
  1. Pass a string with upper case letters and text in () to FatDiskName()
  2. Check if the string is returned in lower case without ()
Member testFatDiskNameNameEmpty ()
  1. Pass an empty string to FatDiskName()
  2. Check if empty string is returned
Member testFindCmd4ArchiveLibFile ()
  1. Call FindCmd() on ar file
  2. Check if function returns correct index
Member testFindCmd4Bz2File ()
  1. Call FindCmd() on bz2 file
  2. Check if function returns correct index
Member testFindCmd4CabFile ()
  1. Call FindCmd() on cab file
  2. Check if function returns correct index
Member testFindCmd4CpioFile ()
  1. Call FindCmd() on cpio file
  2. Check if function returns correct index
Member testFindCmd4DebFile ()
  1. Call FindCmd() on deb file
  2. Check if function returns correct index
Member testFindCmd4DscFile ()
  1. Call FindCmd() on dsc file
  2. Check if function returns correct index
Member testFindCmd4ExeFile ()
  1. Call FindCmd() on exe file
  2. Check if function returns correct index
Member testFindCmd4Ext2File ()
  1. Call FindCmd() on ext2 file
  2. Check if function returns correct index
Member testFindCmd4Ext3File ()
  1. Call FindCmd() on ext3 file
  2. Check if function returns correct index
Member testFindCmd4FatFile ()
  1. Call FindCmd() on fat file
  2. Check if function returns correct index
Member testFindCmd4IsoFile ()
  1. Call FindCmd() on iso file
  2. Check if function returns correct index
Member testFindCmd4MsiFile ()
  1. Call FindCmd() on msi file
  2. Check if function returns correct index
Member testFindCmd4NtfsFile ()
  1. Call FindCmd() on fs file
  2. Check if function returns correct index
Member testFindCmd4PartitionFile ()
  1. Call FindCmd() on partition file
  2. Check if function returns correct index
Member testFindCmd4RarFile ()
  1. Call FindCmd() on rar file
  2. Check if function returns correct index
Member testFindCmd4RpmFile ()
  1. Call FindCmd() on rpm file
  2. Check if function returns correct index
Member testFindCmd4TarFile ()
  1. Call FindCmd() on tar file
  2. Check if function returns correct index
Member testFindCmd4ZFile ()
  1. Call FindCmd() on z file
  2. Check if function returns correct index
Member testFindCmd4ZipFile ()
  1. Call FindCmd() on zip file
  2. Check if function returns correct index
Member testFindCmdNormal ()
  1. Call FindCmd() on 7z file
  2. Check if function returns correct index
Member testGetFieldValue ()
  1. Create a string with field='value' format
  2. Call GetFieldValue()
  3. Check if correct filed and value are identified
Member testGetPositionNormal ()
  1. Create 3 URLs (http, https and ftp)
  2. Call GetPosition() on 3 URLs
  3. Check if correct position was returned
Member testGetURLAbnormal_URLIsOneDir ()
  1. Set wget parameters to include several files
  2. Load a URL for a file
  3. Set the TempFileDir and TempFile
  4. Call GetURL()
  5. Check if the files were downloaded
Member testGetURLNormal_URLIsOneFile ()
  1. Load a single file URL
  2. Set the TempFileDir
  3. Call GetURL()
  4. Check if the file got downloaded
Member testIsDebianSourceFile ()
  1. Call IsDebianSourceFile() on dsc file
  2. Check if function returns YES
Member testIsExeFile ()
  1. Call IsDebianSourceFile() on exe file
  2. Check if function returns YES
Member testIsFileNormal_RegulerFile ()
  1. Create a file
  2. Call IsFile()
  3. Check if result is 1
Member testIsFileNormal_SymLink ()
  1. Create a file and a symlink to the file
  2. Call IsFile() to follow symlink
  3. Check if result is 1
Member testIsNotDebianSourceFile ()
  1. Call IsDebianSourceFile() on non dsc file
  2. Check if function returns NO
Member testIsNotExeFile ()
  1. Call IsDebianSourceFile() on non exe file
  2. Check if function returns NO
Member testListFolders ()
  1. List folders using listFolders()
  2. Check for the return code
Member testListUploads ()
  1. List uploads using listUploads()
  2. Check for the return code
Member testPathCheck ()
  1. Create a string with H, R and U
  2. Call PathCheck() and check if place holders are replaced
Member testPruneFileFileSzieIs0 ()
  1. Copy a null file (size 0) and call Prune()
  2. Check if directory is removed
Member testPruneRegFile ()
  1. Copy a regular file and call Prune()
  2. Check if directory is not removed
Member testSetEnvNormal ()
  1. Set parameters for wget_agent
  2. Call SetEnv()
  3. Check if the parameters get set
Member testSumComputeFile ()
  1. Compute checksum of a known file using SumComputeFile()
  2. Compare if the function result correct checksum
Member testSumToString ()
  1. Get a result from SumComputeFile()
  2. Call SumToString() on the result
  3. Check if the function translated the structure to a string
Member testTaintURL ()
  1. Create URLs with unwanted characters
  2. Call TaintURL()
  3. Check if result is 1
Member testTraverseChild4DebianSourceFile ()
  1. Create a ContainerInfor for a DSC file
  2. Pass it to TraverseChild()
  3. Check if files are unpacked
Member testTraverseChild4IsoFile ()
  1. Create a ContainerInfor for an ISO file
  2. Pass it to TraverseChild()
  3. Check if files are unpacked
Member testTraverseChild4PartitionFile ()
  1. Create a ContainerInfor for a partition files
  2. Pass it to TraverseChild()
  3. Check if files are unpacked
Member testTraverseNormal4Dir ()
  1. Call Traverse() on a directory containing packages
  2. Check if the files are unpacked properly
Member testTraverseNormal4Package ()
  1. Call Traverse() on a single package
  2. Check if the files are unpacked
Member testTraverseNormal4Package2 ()
  1. Call Traverse() on a single package
  2. Check if the files are unpacked
Member testTraverseNormal4Rpm ()
  1. Call Traverse() on a single RPM package
  2. Check if the files are unpacked
Member testTraverseNullParams ()
  1. Call Traverse() on empty strings
  2. Check if function returns 0
  3. Check if nothing is done by function
Member testTraverseStartDir ()
  1. Pass a directory's location to TraverseStart()
  2. Check if files are unpacked
Member testTraverseStartNormal ()
  1. Pass a normal file location to TraverseStart()
  2. Check if files are unpacked
Member testUsage ()
  1. Call Usage()
  2. Check the results