FOSSology  4.4.0
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 a UPX file to the agent
  2. Check if the contents of file get unpacked

  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 a Jar file to the agent
  2. Check if the contents of Jar get unpacked

  1. Pass the files to the agent
  2. Check if the contents of files get unpacked

  1. Pass an RAR file to the agent compressed on windows
  2. Check if the contents of RAR get unpacked
Member cliParamsTest4Ununpack::testNormalLz4 ()
  1. Pass the files to the agent
  2. Check if the contents of files get unpacked
Member cliParamsTest4Ununpack::testNormalLzma ()
  1. Pass the files to the agent
  2. Check if the contents of files 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::testNormalZip ()
  1. Pass a ZIP file to the agent
  2. Check if the contents of ZIP get unpacked
Member cliParamsTest4Ununpack::testNormalZst ()
  1. Pass the files to the agent
  2. Check if the contents of files 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 CompatibilityScheduledTest::testRun ()
  1. Setup test tables
  2. Setup test repo
  3. Run compatibility on upload id 3
  4. Remove test repo
  5. Check some entries in comp_result 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\Decider\DeciderAgentTest::testallLicenseInType_twoOfThem ()
  1. Create matches with compliant license type.
  2. Test if DeciderAgent::allLicenseInType() returns true
Member Fossology\Decider\DeciderAgentTest::testallLicenseInType_twoOfThemNonComp ()
  1. Create matches with compliant and non-compliant license types.
  2. Test if DeciderAgent::allLicenseInType() returns false
Member Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfFit ()
  1. Create monk license match
  2. Create nomos license match inside monk match
  3. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns true
Member Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfNoMonk ()
  1. Create nomos license match only
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false
Member Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfNoneAtAll ()
  1. Create empty license matches
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false
Member Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfNoNomos ()
  1. Create monk license matche only
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false
Member Fossology\Decider\DeciderAgentTest::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\Decider\DeciderAgentTest::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\Decider\DeciderAgentTest::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\Decider\DeciderAgentTest::testAreNomosMonkNinkaAgreed_notIfOnlyTwoOfThem ()
  1. Create monk and nomos license match only
  2. Test if DeciderAgent::areNomosMonkNinkaAgreed() returns false
Member Fossology\Decider\DeciderAgentTest::testnoLicenseConflict_twoOfThem ()
  1. Create compatibility matches.
  2. Test if DeciderAgent::noLicenseConflict() returns true
Member Fossology\Decider\DeciderAgentTest::testnoLicenseConflict_twoOfThemNotComp ()
  1. Create compatibility miss match for 2 licenses.
  2. Test if DeciderAgent::noLicenseConflict() returns false
Member Fossology\DeciderJob\Test\SchedulerTest::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\DeciderJob\Test\SchedulerTest::testDeciderMockedScanWithTwoEventAndNoAgentShouldMakeADecision ()
  1. Insert few clearing events
  2. Run DeciderJobAgent Mock
  3. Check for decisions (should exist)
  4. Check if events still exists
Member Fossology\DeciderJob\Test\SchedulerTest::testDeciderMockScanWithNoEventsAndOnlyNomosShouldNotMakeADecision ()
  1. Create findings with nomos
  2. Run DeciderJobAgent Mock
  3. Check for decisions (should not be empty)
Member Fossology\DeciderJob\Test\SchedulerTest::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\DeciderJob\Test\SchedulerTest::testDeciderRealScanWithNoEventsAndOnlyNomosShouldNotMakeADecision ()
  1. Create findings with nomos
  2. Run DeciderJobAgent Cli
  3. Check for decisions (should not be empty)
Member Fossology\DeciderJob\Test\SchedulerTest::testDeciderRealScanWithTwoEventAndNoAgentShouldMakeADecision ()
  1. Insert few clearing events
  2. Run DeciderJobAgent Cli
  3. Check for decisions (should exist)
  4. Check if events still exists
Member Fossology\DeciderJob\Test\SchedulerTest::testDeciderScanWithTwoEventAndNoAgentShouldMakeADecision ()
  1. Insert two clearing events
  2. Run DeciderJobAgent
Member Fossology\Lib\Application\LicenseCsvExportTest::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\Lib\Application\LicenseCsvExportTest::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\Lib\Application\LicenseCsvExportTest::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\Lib\Application\LicenseCsvImportTest::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\Lib\Application\LicenseCsvImportTest::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\Lib\Application\LicenseCsvImportTest::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\Lib\Application\LicenseCsvImportTest::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\Lib\Application\LicenseCsvImportTest::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\Lib\Application\LicenseCsvImportTest::testHandleFileIfFileIsNotParsable ()
  1. Call LicenseCsvImport::handleFile() on non-csv file
  2. Function must return Error while parsing file
Member Fossology\Lib\Application\LicenseCsvImportTest::testHandleFileIfFileNotExists ()
  1. Call LicenseCsvImport::handleFile() on non-existing file
  2. Function must return Internal error
Member Fossology\Lib\Application\LicenseCsvImportTest::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\Lib\Application\LicenseCsvImportTest::testHandleHeadCsv_missingMandidatoryKey ()
  1. Initialize LicenseCsvImport.
  2. Call LicenseCsvImport::handleHeadCsv() on missing header names.
  3. Function must throw an Exception.
Member Fossology\Lib\Application\LicenseCsvImportTest::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\Lib\Application\LicenseCsvImportTest::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\Lib\Application\RepositoryApiTest::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\Lib\Application\RepositoryApiTest::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\Lib\Application\UserInfoTest::testGetGroupId ()
  1. Set group id in session.
  2. Call UserInfo::getGroupId() and check if the id matches.
Member Fossology\Lib\Application\UserInfoTest::testGetUserId ()
  1. Set user id in session.
  2. Call UserInfo::getUserId() and check if the id matches.
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testGetAllCommentsEverything ()
  1. Fetch all set and unset comments
  2. Check the length of the array matches 7
  3. Check some values
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::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\Lib\Dao\LicenseStdCommentDaoTest::testGetCommentInvalid ()
  1. Call function with invalid id
  2. Check if the function throws exception
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::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\Lib\Dao\LicenseStdCommentDaoTest::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\Lib\Dao\LicenseStdCommentDaoTest::testInsertCommentAsNonAdmin ()
  1. Add a new comment with some value
  2. Check if the function returns -1
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testInsertCommentEmptyValues ()
  1. Add a new comment with empty values
  2. Check if the function returns -1
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testToggleCommentAsAdmin ()
  1. Toggle the comment
  2. Check if the function returns true
  3. Check if the values are updated in DB
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testToggleCommentAsNonAdmin ()
  1. Toggle the comment as non admin
  2. Check if the function returns false
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testToggleCommentInvalidId ()
  1. Toggle the comment with bad id
  2. Check if the function throws an exception
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::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\Lib\Dao\LicenseStdCommentDaoTest::testUpdateCommentAsAdminInvalidId ()
  1. Pass invalid comment id
  2. Check if the function throws exception
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::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\Lib\Dao\LicenseStdCommentDaoTest::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\Lib\Dao\LicenseStdCommentDaoTest::testUpdateCommentFromArrayAsNonAdmin ()
  1. Set user as non admin
  2. Call function
  3. Check if the function returns false
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testUpdateCommentFromArrayEmptyArray ()
  1. Set user as admin
  2. Call function with empty array
  3. Check if the function returns 0
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testUpdateCommentFromArrayEmptyValues ()
  1. Set user as admin
  2. Call function with empty values
  3. Check if the function throws exception
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testUpdateCommentFromArrayInvalidFields ()
  1. Set user as admin
  2. Call function with missing fields
  3. Check if the function throws exception
Member Fossology\Lib\Dao\LicenseStdCommentDaoTest::testUpdateCommentFromArrayInvalidId ()
  1. Set user as admin
  2. Call function with invalid data
  3. Check if the function throws exception
Member Fossology\Lib\Dao\PfileDaoTest::testGetConclusions ()
  1. Test for PfileDao::getConclusions()
  2. Setup test data from SPDX test data
  3. Get conclusion for pfile with given group
  4. Get conclusion for pfile with different group for global decisions
  5. Not found result should be empty array
Member Fossology\Lib\Dao\PfileDaoTest::testGetCopyright ()
  1. Test for PfileDao::getCopyright()
  2. Setup required tables and data
  3. Fetch results for different pfiles with 1 or 2 results
  4. Make sure the license list is sorted
  5. Not found results should be empty array
Member Fossology\Lib\Dao\PfileDaoTest::testGetPfile ()
  1. Test for PfileDao::getPfile()
  2. Fetch multiple pfiles by various input combinations of checksums
  3. Also, the case of checksum should not effect the results
  4. Unavailable pfiles should be returned as null
Member Fossology\Lib\Dao\PfileDaoTest::testGetScannerFindings ()
  1. Test for PfileDao::getScannerFindings()
  2. Setup required tables and data
  3. Fetch results for different pfiles with 1 or 2 results
  4. Make sure the license list is sorted
  5. Not found results should be empty array
Member Fossology\Lib\Dao\PfileDaoTest::testGetUploadForPackage ()
  1. Test for PfileDao::getUploadForPackage()
  2. Check if corrects uploads are returned
  3. Not found result should be null
Member Fossology\Lib\Dao\UploadDaoTest::testGetAssigneeDate ()
Member Fossology\Lib\Dao\UploadDaoTest::testGetClosedDate ()
Member Fossology\Lib\Util\StringOperationTest::testReplaceUnicodeControlChar ()
Test for StringOperation::replaceUnicodeControlChar
  1. Pass various valid and invalid unicode strings as input
  2. Pass various replace characters
  3. Check if the output is free of invalid unichars
Member Fossology\Report\Test\SchedulerTest::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\Reuser\Test\SchedulerTest::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\Reuser\Test\SchedulerTest::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\Reuser\Test\SchedulerTest::testReuserMockedScanWithoutAnyUploadToCopyAndAClearing ()
  1. Run reuser on the empty upload with agent mock
  2. Check that no clearing decisions added by reuser
Member Fossology\Reuser\Test\SchedulerTest::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\Reuser\Test\SchedulerTest::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\Reuser\Test\SchedulerTest::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\Reuser\Test\SchedulerTest::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\Reuser\Test\SchedulerTest::testReuserRealScanWithoutAnyUploadToCopyAndAClearing ()
  1. Run reuser on the empty upload with scheduler cli
  2. Check that no clearing decisions added by reuser
Member Fossology\Reuser\Test\SchedulerTest::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\SpdxTwo\spdx2utilTest::testAddPrefixOnDemandNoChecker ()
  1. Call addPrefixOnDemand() with no check
  2. Check if original string is returned
Member Fossology\SpdxTwo\spdx2utilTest::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\SpdxTwo\spdx2utilTest::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\SpdxTwo\spdx2utilTest::testPreWorkOnArgsFlpZero ()
  1. Create empty args array
  2. Call preWorkOnArgsFlp()
  3. Check if empty array is returned
Member Fossology\SpdxTwo\Test\SchedulerTest::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 Fossology\UI\Api\Helper\RestHelperTest::testCopyUpload ()
  1. Test for RestHelper::copyUpload()
  2. Check if the response for RestHelper::copyUpload() is 202
Member Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequest ()
  1. Test for RestHelper::validateTokenRequest()
  2. Check if RestHelper::validateTokenRequest() accepts valid requests
Member Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequestInvalidExpire ()
  1. Test for RestHelper::validateTokenRequest() with invalid date format
  2. Check if response is 400 with valid message.
Member Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequestInvalidScope ()
  1. Test RestHelper::validateTokenRequest() with invalid scope
  2. Check if the response is 400 with valid message.
Member Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequestMaxExpire ()
  1. Test for RestHelper::validateTokenRequest() with expire > max valid
  2. Check if response is 400 with valid message.
Member Fossology\UI\Api\Test\Controllers\AuthControllerTest::testCreateNewJwtTokenExpiredToken ()
  1. Mock the request to get a new token
  2. Mock a failed response of RestHelper::validateTokenRequest()
  3. Call AuthController::createNewJwtToken()
  4. Check if failed response is returned
Member Fossology\UI\Api\Test\Controllers\AuthControllerTest::testCreateNewJwtTokenInvalidPassword ()
  1. Mock the request to get a new token
  2. Mock a failed response of AuthHelper::checkUsernameAndPassword()
  3. Call AuthController::createNewJwtToken()
  4. Check if failed response is returned
Member Fossology\UI\Api\Test\Controllers\AuthControllerTest::testCreateNewJwtTokenV1 ()
  1. Mock the request to get a new token with V1 parameters
  2. Call AuthController::createNewJwtToken()
  3. Check if response contains a new JWT token
Member Fossology\UI\Api\Test\Controllers\AuthControllerTest::testCreateNewJwtTokenV2 ()
  1. Mock the request to get a new token with V2 parameters
  2. Call AuthController::createNewJwtToken()
  3. Check if response contains a new JWT token
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolder ()
  1. Test for copy action on FolderController::copyFolder()
  2. Check for 202 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderInvalidAction ()
  1. Test for invalid action on FolderController::copyFolder()
  2. Check for 400 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderNotAccessible ()
  1. Test for inaccessible folder on FolderController::copyFolder()
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderNotFound ()
  1. Test for invalid folder copy on FolderController::copyFolder()
  2. Check for 404 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyParentFolderNotAccessible ()
  1. Test for inaccessible parent folder on FolderController::copyFolder()
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyParentFolderNotFound ()
  1. Test for invalid parent copy on FolderController::copyFolder()
  2. Check for 404 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolder ()
  1. Check for FolderController::createFolder()
  2. Check for 201 response with folder id
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderDuplicateNames ()
  1. Check for duplicate folder response from FolderController::createFolder()
  2. Check for 200 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderParentNotAccessible ()
  1. Check for inaccessible parent on FolderController::createFolder()
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testDeleteFolder ()
  1. Test for FolderController::deleteFolder()
  2. Check for 202 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testDeleteFolderInvalidFolder ()
  1. Test if folder is invalid on FolderController::deleteFolder()
  2. Check for 404 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testDeleteFolderNoAccess ()
  1. Test to delete inaccessible folder on FolderController::deleteFolder()
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolder ()
  1. Test for FolderController::editFolder()
  2. Check for 200 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderNotAccessible ()
  1. Test for inaccessible folder on FolderController::editFolder()
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderNotExists ()
  1. Check FolderController::editFolder() on non-existing folder
  2. Check for 404 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetAllFolders ()
  1. Test to get all folders accessible by user by calling FolderController::getFolders()
  2. Check if the response is array of folders
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetInAccessibleFolder ()
  1. Test to check inaccessible folder's response on FolderController::getFolders()
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetInvalidFolder ()
  1. Test to check a 403 response of invalid folder
  2. Call FolderController::getFolders() for invalid folder
  3. Check for a 403 response
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetSpecificFolders ()
  1. Test to get specific folder from FolderController::getFolders()
  2. Check if the response is a single object of Folder
Member Fossology\UI\Api\Test\Controllers\FolderControllerTest::testMoveFolder ()
  1. Test for move action on FolderController::copyFolder()
  2. Check for 202 response
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testAddMemberUserAlreadyMember ()
  1. Test GroupController::addMember()
  2. The user already a member
  3. Test if the response body matches
  4. Test if the response status is 400
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testAddMemberUserGroupAdmin ()
  1. Test GroupController::addMember()
  2. The user is not an admin but group admin
  3. Test if the response status is 200
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testAddMemberUserNotAdmin ()
  1. Test GroupController::addMember()
  2. The user is not an admin
  3. Test if the response status is 403
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testAddMemberUserNotMember ()
  1. Test GroupController::addMember()
  2. The user already a member
  3. Test if the response body matches
  4. Test if the response status is 200
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testChangeUserPermission ()
  1. Test GroupController::getGroupMembers() for all groups
  2. Check if the response is list of group members
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testDeleteGroup ()
  1. Test GroupController::deleteGroup() for valid delete request
  2. Check if response status is 202
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testGetDeletableGroups ()
  1. Test GroupController::getDeletableGroups()
  2. Check if the response is a list of groups.
Member Fossology\UI\Api\Test\Controllers\GroupControllerTest::testGetGroupMembers ()
  1. Test GroupController::getGroupMembers() for all groups
  2. Check if the response is list of group members
Member Fossology\UI\Api\Test\Controllers\JobControllerTest::testGetInvalidJob ()
  1. Test JobController::getJobs() with invalid job id
  2. Check if response is 404
Member Fossology\UI\Api\Test\Controllers\JobControllerTest::testGetJobFromId ()
  1. Test JobController::getJobs() with single job id
  2. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\JobControllerTest::testGetJobs ()
  1. Test JobController::getJobs() for all jobs
  2. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\JobControllerTest::testGetJobsFromUpload ()
  1. Test JobController::getJobs() with single upload
  2. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\JobControllerTest::testGetJobsLimitPage ()
  1. Test JobController::getJobs() with limit and page set
  2. Check if response is 200 and have correct total pages header
Member Fossology\UI\Api\Test\Controllers\JobControllerTest::testGetJobStatus ()
  1. Test JobController::getJobStatus()
  2. Setup one job with two complete children => result Completed
  3. Setup one job with one child processing and other in queue => result Processing
  4. Setup one job with one child completed and one failed => result Failed
Member Fossology\UI\Api\Test\Controllers\JobControllerTest::testGetUploadEtaInSeconds ()
  1. Test JobController::getUploadEtaInSeconds()
  2. Test if HH:MM:SS can be translated to seconds
  3. Test if empty response results in 0
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testCreateDuplicateLicense ()
  1. Test for LicenseController::createLicense() to create new license
  2. Simulate duplicate license name
  3. Check if response is 409
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testCreateLicense ()
  1. Test for LicenseController::createLicense() to create new license
  2. Check if response is 201
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testCreateLicenseNoAdmin ()
  1. Test for LicenseController::createLicense() to create new license
  2. Non admin user can't create main license
  3. Check if response is 403
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testCreateLicenseNoShort ()
  1. Test for LicenseController::createLicense() to create new license
  2. The request body is malformed
  3. Check if response is 400
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testDeleteAdminLicenseCandidateIsAdmin ()
  1. Test for LicenseController::deleteAdminLicenseCandidate() to delete license-candidate.
  2. User is admin
  3. License-candidate is does exist
  4. Check if response is 200
  5. Check if response-body matches
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testDeleteAdminLicenseCandidateNotAdmin ()
  1. Test for LicenseController::deleteAdminLicenseCandidate() to delete license-candidate.
  2. User is not-admin
  3. License-candidate is does exist
  4. Check if response is 400
  5. Check if response-body matches
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testDeleteAdminLicenseCandidateNotFound ()
  1. Test for LicenseController::deleteAdminLicenseCandidate() to delete license-candidate.
  2. User is admin
  3. License-candidate don't exist
  4. Check if response is 404
  5. Check if rseponse-body matches
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetAllLicense ()
  1. Test for LicenseController::getAllLicenses() to fetch all licenses
  2. Check if response is 200
  3. Check if pagination headers are set
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetAllLicenseBounds ()
  1. Test for LicenseController::getAllLicenses() to fetch all licenses
  2. The page requested is out of bounds
  3. Check if response is 400
  4. Check if pagination headers are set
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetAllLicenseFilters ()
  1. Test for LicenseController::getAllLicenses() with kind filter
  2. Check if proper parameters are passed to DbHelper
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetCandidates ()
  1. Test for LicenseController::getCandidates()
  2. Check if status is 200
  3. Check if response-body matches
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetCandidatesNoAdmin ()
  1. Test for LicenseController::getCandidates() as a non-admin user
  2. Check if status is 403
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetLicense ()
  1. Test for LicenseController::getLicense() to fetch single license
  2. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetLicenseNotFound ()
  1. Test for LicenseController::getLicense(), license not found
  2. Check if response is 404
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testGetLicenseObligations ()
  1. Test for LicenseController::getLicense() to fetch single license
  2. The license now has obligations
  3. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testImportLicense ()
  1. Test for LicenseController::handleImportLicense()
  2. Check if response status is 200
  3. Check if response body is matches the expected response body
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testUpdateLicense ()
  1. Test for LicenseController::updateLicense() to edit a license
  2. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testUpdateLicenseNonAdmin ()
  1. Test for LicenseController::updateLicense() to edit a license
  2. User is not admin
  3. Check if response is 403
Member Fossology\UI\Api\Test\Controllers\LicenseControllerTest::testUpdateLicenseNonAdvisor ()
  1. Test for LicenseController::updateLicense() to edit a license
  2. User is not admin/advisor of the group
  3. Check if response is 403
Member Fossology\UI\Api\Test\Controllers\MaintenanceControllerTest::testCreateMaintenance ()
  1. Test MaintenanceController::testCreateMaintenance() for valid create maintenance request
  2. Check if response status is 201
Member Fossology\UI\Api\Test\Controllers\MaintenanceControllerTest::testCreateMaintenanceInvalidGoldDate ()
  1. Test MaintenanceController::testCreateMaintenance() for valid create maintenance
  2. Check if HttBadRequestException is thrown when GoldDate is not provided
Member Fossology\UI\Api\Test\Controllers\MaintenanceControllerTest::testCreateMaintenanceInvalidLogsDate ()
  1. Test MaintenanceController::testCreateMaintenance() for valid create maintenance
  2. Check if HttBadRequestException is thrown when LogsDate is not provided
Member Fossology\UI\Api\Test\Controllers\MaintenanceControllerTest::testCreateMaintenanceOptionKeyNotFound ()
  1. Test MaintenanceController::testCreateMaintenance() for valid create maintenance
  2. Check if HttpNotFoundException is thrown when unknown key is encountered
Member Fossology\UI\Api\Test\Controllers\MaintenanceControllerTest::testCreateMaintenanceUserNotAdmin ()
  1. Test MaintenanceController::testCreateMaintenance() for valid create maintenance
  2. Check if access is denied with HttpForbiddenException for non admin users
Member Fossology\UI\Api\Test\Controllers\MaintenanceControllerTest::testCreateMaintenanceWithBadRequest ()
  1. Test MaintenanceController::testCreateMaintenance() for valid create maintenance
  2. Check if access is denied with HttpForbiddenException for non admin users
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReport ()
  1. Test ReportController::downloadReport()
  2. Generate all mock objects
  3. Generate a temporary file to be downloaded
  4. Replicate expected headers
  5. Check for actual headers
  6. Check for actual file content
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReportInAccessibleUpload ()
  1. Test ReportController::downloadReport() for inaccessible upload
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReportInvalidUpload ()
  1. Test ReportController::downloadReport() for invalid upload
  2. Check for 404 response
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReportTryLater ()
  1. Test ReportController::downloadReport() for early download
  2. Check for 503 response with Retry-After headers.
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportAllFormats ()
  1. Test ReportController::getReport() for all available report types
  2. Check the response for 201
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportInaccessibleUpload ()
  1. Test ReportController::getReport() for inaccessible upload
  2. Check for 403 response
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportInvalidFormat ()
  1. Test ReportController::getReport() for invalid report type
  2. Test for 400 response
Member Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportInvalidUpload ()
  1. Test ReportController::getReport() for invalid upload
  2. Check for 404 response
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUploadV1 ()
  1. Test for UploadController::moveUpload() for a copy action when version is V1
  2. Check if response status is 202
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUploadV2 ()
  1. Test for UploadController::moveUpload() for a copy action when version is V2
  2. Check if response status is 202
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetClearingProgressInfo ()
  1. Test for UploadController::getClearingProgressInfo()
  2. Check if response status is 200 and the body matches
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetMainLicenses ()
  1. Test for UploadController::getMainLicenses()
  2. Check if response status is 200 and RES body matches
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetReuseReportSummary ()
  1. Test for UploadController::getReuseReportSummary()
  2. Check if response status is 200 & Response body is correct
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadInAccessible ()
  1. Test for UploadController::getUploads() for inaccessible upload
  2. Check if response status is 403
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadNotUnpacked ()
  1. Test for UploadController::getUploads() where ununpack not finished
  2. Check if the response status is 503
  3. Check if the response has headers Retry-After and Look-at set
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadV1 ()
  1. Test for UploadController::getUploads() to fetch single upload when version is V1
  2. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadV2 ()
  1. Test for UploadController::getUploads() to fetch single upload when version is V2
  2. Check if response is 200
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesPendingScan ()
  1. Test for UploadController::getUploadLicenses() when agents pending
  2. Check if response status is 503
  3. Check if response headers Retry-After and Look-at set
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesV1 ()
  1. Test for UploadController::getUploadLicenses() when version is V1
  2. Check if the response status is 200 with correct information
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesV2 ()
  1. Test for UploadController::getUploadLicenses() when version is V2
  2. Check if the response status is 200 with correct information
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadsV1 ()
  1. Test UploadController::getUploads() for all uploads when version is V1
  2. Check if the response is array with status 200
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadsV2 ()
  1. Test UploadController::getUploads() for all uploads when version is V2
  2. Check if the response is array with status 200
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadWithFiltersV1 ()
  1. Test for UploadController::getUploads() with filters when version is V1
  2. Setup various options according to query parameter which will be passed to DbHelper::getUploads()
  3. Make sure all mocks are having once() set to force mockery
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadWithFiltersV2 ()
  1. Test for UploadController::getUploads() with filters when version is V2
  2. Setup various options according to query parameter which will be passed to DbHelper::getUploads()
  3. Make sure all mocks are having once() set to force mockery
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testMoveUploadInvalidFolder ()
  1. Test for UploadController::moveUpload() with invalid folder id
  2. Check if response status is 400
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessibleV1 ()
  1. Test for UploadController::postUpload() with inaccessible folder with V1 parameters
  2. Check if response status is 403
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessibleV2 ()
  1. Test for UploadController::postUpload() with inaccessible folder with V2 parameters
  2. Check if response status is 403
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFoundV1 ()
  1. Test for UploadController::postUpload() with invalid folder id with V1 parameters
  2. Check if response status is 404
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFoundV2 ()
  1. Test for UploadController::postUpload() with invalid folder id with V2 parameters
  2. Check if response status is 404
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalErrorV1 ()
  1. Test for UploadController::postUpload() with internal error with V1 parameters
  2. Check if response status is 500 with error messages set
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalErrorV2 ()
  1. Test for UploadController::postUpload() with internal error with V2 parameters
  2. Check if response status is 500 with error messages set
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadV1 ()
  1. Test for UploadController::postUpload() with V1 parameters
  2. Check if response status is 201 with upload id
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadV2 ()
  1. Test for UploadController::postUpload() with V2 parameters
  2. Check if response status is 201 with upload id
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testRemoveMainLicense ()
  1. Test for UploadController::removeMainLicense()
  2. Check if response status is 200 and the body matches
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetMainLicense ()
  1. Test for UploadController::setMainLicense()
  2. Check if response status is 200 and Res body matches
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetMainLicense_exists ()
  1. Test for UploadController::setMainLicense()
  2. Check if response status is 400, when the license already Exists and Res body matches
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testUpdateUpload ()
  1. Test for UploadController::updateUpload()
  2. Check if response status is 202
Member Fossology\UI\Api\Test\Controllers\UploadControllerTest::testUpdateUploadNoPerm ()
  1. Test for UploadController::updateUpload() without permission
  2. Check if response status is 403
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetBulkHistory ()
  1. Test for UploadTreeController::getClearingHistory()
  2. Check if response status is 200 and RES body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetClearingHistory ()
  1. Test for UploadTreeController::getClearingHistory()
  2. Check if response status is 200 and RES body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetHighlightEntries ()
  1. Test for UploadController::viewLicenseFile() with valid status
  2. Check if response status is 200 and the body has the expected contents
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetLicenseDecisions ()
  1. Test for UploadTreeController::getLicenseDecisions()
  2. Check if response status is 200 and RES body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetNextPreviousItem ()
  1. Test for UploadTreeController::getNextPreviousItem()
  2. Check if response status is 200 and RES body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetNextPreviousItem_isSelectionValid ()
  1. Test for UploadTreeController::getNextPreviousItem()
  2. Check if response status 400 & response body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewAgentNotFound ()
  • # Test UploadTreeController::getTreeView
  • # Check if HttpNotFound Exception is thrown for unavailable agent.
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewTagNotFound ()
  • # Test UploadTreeController::getTreeView
  • # Check if HttpNotFound Exception is thrown for unavailable tag.
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewUploadNotAccessible ()
  • # Test UploadTreeController::getTreeView
  • # Check if HttpForbiden exception is thrown for unaccessible upload
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewUploadNotFound ()
  1. Test for UploadTreeController::getTreeView()
  2. Check if the HttpNotFoundException is thrown
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testHandleAddEditAndDeleteLicenseDecision_Add ()
  1. Test for UploadTreeController::handleAddEditAndDeleteLicenseDecision() for adding, editing, and deleting license decision
  2. Check if response status is 200 and response body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testHandleAddEditAndDeleteLicenseDecision_Delete ()
  1. Test for UploadTreeController::handleAddEditAndDeleteLicenseDecision() for adding, editing, and deleting license decision
  2. Check if response status is 200 and response body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testHandleAddEditAndDeleteLicenseDecision_Edit ()
  1. Test for UploadTreeController::handleAddEditAndDeleteLicenseDecision() for adding, editing, and deleting license decision
  2. Check if response status is 200 and response body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testScheduleBulkScan ()
  1. Test for UploadTreeController::getNextPreviousItem()
  2. Check if response status is 200 and RES body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testSetClearingDecisionReturnsError ()
  1. Test for UploadTreeController::setClearingDecision() for setting a clearing decision
  2. Check if response status is 400, if the given decisionType is invalid
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testSetClearingDecisionReturnsOk ()
  1. Test for UploadTreeController::setClearingDecision() for setting a clearing decision
  2. Check if response status is 200 and response body matches
Member Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testViewLicenseFile ()
  1. Test for UploadController::viewLicenseFile() with valid status
  2. Check if response status is 200 and the body has the expected contents
Member Fossology\UI\Api\Test\Controllers\UserControllerTest::testDeleteUser ()
  1. Test UserController::deleteUser() for valid delete request
  2. Check if response status is 202
Member Fossology\UI\Api\Test\Controllers\UserControllerTest::testDeleteUserDoesNotExists ()
  1. Test UserController::deleteUser() for invalid user id
  2. Check if response status is 404
Member Fossology\UI\Api\Test\Controllers\UserControllerTest::testGetAllUsers ()
  1. Test UserController::getUsers() for all users
  2. Check if the response is list of user info
Member Fossology\UI\Api\Test\Controllers\UserControllerTest::testGetCurrentUser ()
  1. Test UserController::getCurrentUser()
  2. Check if response contains current user's info
Member Fossology\UI\Api\Test\Controllers\UserControllerTest::testGetSpecificUser ()
  1. Test UserController::getUsers() for specific user id
  2. Check if response contains only one user info
Member Fossology\UI\Api\Test\Controllers\UserControllerTest::testGetSpecificUserNotFound ()
  1. Test UserController::getUsers() for invalid user id
  2. Check if response status is 404
Member Fossology\UI\Api\Test\Helper\AuthHelperTest::testIsTokenActive ()
  1. Test for AuthHelper::isTokenActive()
  2. Generate two DB rows with active and inactive tokens
  3. Call AuthHelper::isTokenActive() on both rows and check for exception
Member Fossology\UI\Api\Test\Helper\AuthHelperTest::testIsTokenActiveExpireOldToken ()
  1. Test for AuthHelper::isTokenActive()
  2. Generate DB row with expired token
  3. Check if AuthHelper::isTokenActive() calls DbHelper::invalidateToken()
  4. Check if the function throws exception
Member Fossology\UI\Api\Test\Helper\AuthHelperTest::testUserHasGroupAccess ()
  1. Test for AuthHelper::userHasGroupAccess()
  2. Check if the function accepts correct group
  3. Check if the function throws exception for inaccessible group
Member Fossology\UI\Api\Test\Helper\AuthHelperTest::testVerifyAuthToken ()
  1. Test for AuthHelper::verifyAuthToken(), AuthHelper::generateJwtToken() and AuthHelper::isTokenActive()
  2. Generate a JWT token using AuthHelper::generateJwtToken()
  3. Call AuthHelper::verifyAuthToken()
  4. Check if no exception is thrown
  5. Check if the function updates user id and token scope.
Member Fossology\UI\Api\Test\Helper\AuthHelperTest::testVerifyAuthTokenInactiveUser ()
  1. Test for AuthHelper::verifyAuthToken() with inactive user
  2. Generate a JWT token using AuthHelper::generateJwtToken()
  3. Call AuthHelper::verifyAuthToken()
  4. Check if the function throws exception
Member Fossology\UI\Api\Test\Helper\DbHelperTest::testGetUsersAll ()
  1. Test for DbHelper::getUsers()
  2. Check if all users are returned for admin user
Member Fossology\UI\Api\Test\Helper\DbHelperTest::testGetUsersAllNonAdmin ()
  1. Test for DbHelper::getUsers()
  2. Check if all users are returned, masking other users for non-admin users
Member Fossology\UI\Api\Test\Helper\DbHelperTest::testGetUsersSingleUserAdmin ()
  1. Test for DbHelper::getUsers() fetching specific user
  2. Check if complete object is returned
Member Fossology\UI\Api\Test\Helper\DbHelperTest::testGetUsersSingleUserNonAdmin ()
  1. Test for DbHelper::getUsers() fetching single user by non-admin user
  2. Check if masked user is returned
Member Fossology\UI\Api\Test\Models\AnalysisTest::testDataFormatV1 ()
  1. Test the data format returned by Analysis::getArray($version) model when $version is V1
  2. Create expected array
  3. Create test object and set the values
  4. Get the array from object and match with expected array
Member Fossology\UI\Api\Test\Models\AnalysisTest::testDataFormatV2 ()
  1. Test the data format returned by Analysis::getArray($version) model when $version is V2
  2. Create expected array
  3. Create test object and set the values
  4. Get the array from object and match with expected array
Member Fossology\UI\Api\Test\Models\AnalysisTest::testSetUsingArrayV1 ()
  1. Test for Analysis::setUsingArray() when $version is V1
  2. Check if the Analysis object is updated with actual array values
Member Fossology\UI\Api\Test\Models\AnalysisTest::testSetUsingArrayV2 ()
  1. Test for Analysis::setUsingArray() when $version is V2
  2. Check if the Analysis object is updated with actual array values
Member Fossology\UI\Api\Test\Models\AnalysisTest::testSetUsingString ()
  1. Test for Analysis::setUsingString()
  2. Create two strings with different delimiters
  3. Check if the created Analysis objects hold expected values
Member Fossology\UI\Api\Test\Models\DeciderTest::testDataFormatV1 ()
  1. Test the data format returned by Decider::getArray($version) model when $version is V1
  2. Create expected array and update test object to match it
  3. Get the array from object and match with expected array
Member Fossology\UI\Api\Test\Models\DeciderTest::testDataFormatV2 ()
  1. Test the data format returned by Decider::getArray($version) model when $version is V2
  2. Create expected array and update test object to match it
  3. Get the array from object and match with expected array
Member Fossology\UI\Api\Test\Models\DeciderTest::testSetUsingArrayV1 ()
  1. Test for Decider::setUsingArray() when $version is V1
  2. Create a test array and pass to setUsingArray() on test object
  3. Check if the object is updated
Member Fossology\UI\Api\Test\Models\DeciderTest::testSetUsingArrayV2 ()
  1. Test for Decider::setUsingArray() when $version is V2
  2. Create a test array and pass to setUsingArray() on test object
  3. Check if the object is updated
Member Fossology\UI\Api\Test\Models\FileTest::testDataFormat ()
  1. Test for keys in File model
Member Fossology\UI\Api\Test\Models\FolderTest::testDataFormat ()
  1. Test for keys in Folder model
Member Fossology\UI\Api\Test\Models\InfoTest::testDataFormat ()
  1. Test the data format returned by Info::getArray() model
Member Fossology\UI\Api\Test\Models\JobTest::testDataFormatV1 ()
  1. Test data model returned by Job::getArray($version) when API version is V1
Member Fossology\UI\Api\Test\Models\JobTest::testDataFormatV2 ()
  1. Test data model returned by Job::getArray($version) when API version is V2
Member Fossology\UI\Api\Test\Models\LicenseTest::testArrayParser ()
  1. Test parser License::parseFromArray()
  2. Create a valid license input and check the function.
  3. Create an input with invalid keys and check if function returns error.
Member Fossology\UI\Api\Test\Models\LicenseTest::testDataFormat ()
  1. Test data model returned by License::getArray() is correct
Member Fossology\UI\Api\Test\Models\LicenseTest::testDataFormatNoObligation ()
  1. Test data model returned by License::getArray() is correct when there is no obligation
Member Fossology\UI\Api\Test\Models\ObligationTest::testDataFormat ()
  1. Test data model returned by Obligation::getArray() is correct
Member Fossology\UI\Api\Test\Models\ReuserTest::testReuserConst ()
  1. Test constructor and Reuser::getArray()
Member Fossology\UI\Api\Test\Models\ReuserTest::testReuserException ()
  1. Test if UnexpectedValueException is thrown for invalid upload and group id by constructor
Member Fossology\UI\Api\Test\Models\ReuserTest::testSetUsingArrayException ()
  1. Test if UnexpectedValueException is thrown for invalid upload and group id by Reuser::setUsingArray()
Member Fossology\UI\Api\Test\Models\ReuserTest::testSetUsingArraySomeOptions ()
  1. Test for Reuser::setUsingArray()
  2. Add some changes to the array.
Member Fossology\UI\Api\Test\Models\ReuserTest::testSetUsingArrayV1 ()
  1. Test for Reuser::setUsingArray() when $version is V1
  2. Check if the Reuser object is updated with actual array values
Member Fossology\UI\Api\Test\Models\ReuserTest::testSetUsingArrayV2 ()
  1. Test for Reuser::setUsingArray() when $version is V2
  2. Check if the Reuser object is updated with actual array values
Member Fossology\UI\Api\Test\Models\ScanOptionsTest::testScheduleAgents ()
  1. Test for ScanOptions::scheduleAgents()
  2. Prepare Request and call ScanOptions::scheduleAgents()
  3. Function should call AgentAdder::scheduleAgents()
Member Fossology\UI\Api\Test\Models\SearchResultTest::testDataFormat ()
  1. Test the data format returned by SearchResult::getArray() model
Member Fossology\UI\Api\Test\Models\UploadSummaryTest::testDataFormat ()
  1. Test the data format returned by UploadSummary::getArray() model
Member Fossology\UI\Api\Test\Models\UploadSummaryTest::testStatusToString ()
  1. Test for UploadSummary::statusToString()
  2. Check if the function responds correct string for each UploadStatus member.
  3. Also check if the function handles invalid values.
Member Fossology\UI\Api\Test\Models\UploadTest::testDataFormatV1 ()
  1. Test the data format returned by Upload::getArray($version) model when $version is V1
Member Fossology\UI\Api\Test\Models\UploadTest::testDataFormatV2 ()
  1. Test the data format returned by Upload::getArray($version) model when $version is V2
Member Fossology\UI\Api\Test\Models\UserTest::testDataFormatV1 ()
  1. Test the data format returned by User::getArray($version) model when $version is V1
  2. Create expected array
  3. Create test object and set the values
  4. Get the array from object and match with expected array
Member Fossology\UI\Api\Test\Models\UserTest::testDataFormatV2 ()
  1. Test the data format returned by User::getArray($version) model when $version is V2
  2. Create expected array
  3. Create test object and set the values
  4. Get the array from object and match with expected array
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 regexTest::regTestSpecialEnd (void)
  1. Create a test SPDX identifier string with special characters at end
  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::regIpraTest ()
  1. Create a Ipra 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_common_auth::test_generate_password_policy_all ()
  1. Setup SYSCONFIG
  2. Enable all policy settings
  3. Call generate_password_policy() and match expected regex
Member test_common_auth::test_generate_password_policy_disable ()
  1. Setup SYSCONFIG
  2. Enable all policy settings
  3. Disable password policy
  4. generate_password_policy() should return regex to match all
Member test_common_auth::test_generate_password_policy_no_limit ()
  1. Setup SYSCONFIG
  2. Enable all policy settings
  3. Set min and max limits as empty
  4. Call generate_password_policy() and match expected regex with * limit
Member test_common_auth::test_generate_password_policy_no_max ()
  1. Setup SYSCONFIG
  2. Enable all policy settings
  3. Set max limit as empty
  4. Call generate_password_policy() and match expected regex without max limit
Member test_common_auth::test_generate_password_policy_no_min ()
  1. Setup SYSCONFIG
  2. Enable all policy settings
  3. Set min limit to empty
  4. Call generate_password_policy() and match expected regex with min limit as 0
Member test_common_auth::test_generate_password_policy_no_special ()
  1. Setup SYSCONFIG
  2. Enable all policy settings
  3. Set special characters as empty
  4. Call generate_password_policy() and match expected regex to accept any special character
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 TestCompatibility::test_license_compatible ()
  1. Load test license compatiblity rules
  2. Check if two license types mentioned directly works for true
  3. Check if two license types mentioned directly works for false
  4. Check if two license names mentioned directly takes precidence even if their types are also mentioned.
  5. Check if license name and type check works.
  6. Check if license name and type check works in reverse order..
  7. Check if default rule works.
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 testExtractZst4EmptyParameters ()
  1. Call ExtractZst() with empty parameters
  2. Check if the function return NOT OK
Member testExtractZst4ErrorParameters ()
  1. Try to extract null_file archives using ExtractZst()
  2. Check if the function return NOT OK
Member testExtractZstdFile ()
  1. Try to extract .zst file using ExtractZstd()
  2. Check if the files are unpacked
Member testExtractZstlz4File ()
  1. Try to extract .lz4 archives using ExtractZst()
  2. Check if the files are unpacked
Member testExtractZstlzmaFile ()
  1. Try to extract .lzma archives using ExtractZst()
  2. Check if the files are 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
Member TestUtility::testLicensesToSet ()
  1. Create sample license string concatenated with " AND "
  2. Create expected set with unique licenses from the string
  3. Compare expected set with output from mainLicenseToSet()