FOSSology  4.4.0
Open Source License Compliance by Open Source Software
cliParamsTest4Ununpack Class Reference

Test the ununpack agent cli parameters. (Normal) More...

Inheritance diagram for cliParamsTest4Ununpack:
Inheritance graph
Collaboration diagram for cliParamsTest4Ununpack:
Collaboration graph

Public Member Functions

 setUp ()
 Setup test repo and db. More...
 
 tearDown ()
 Teardown test repo and db. More...
 
 testNormalParamI ()
 Call agent with -i flag. More...
 
 testNormalIso1 ()
 Pass an iso to agent. More...
 
 testNormalParamL ()
 Pass a log file to the agent. More...
 
 testNormalParamx ()
 Check clean flag. More...
 
 testNormalParamr ()
 Check recurse flag. More...
 
 testNormalIso2 ()
 Pass an iso to agent. More...
 
 testNormalRpm ()
 Check for RPM files. More...
 
 testNormalTar ()
 Check for TAR files. More...
 
 testNormalJar ()
 Check for RAR files compressed on Windows systems. More...
 
 testNormalZip ()
 Check for ZIP files. More...
 
 testNormalDsc ()
 Check for CAB and MSI files. More...
 
 testNormalCompressedFile ()
 Check for Z, GZ and BZ2 files. More...
 
 testNormalTarball ()
 Check for Z, GZ and BZ2 tarballs. More...
 
 testNormalPdf ()
 Check for PDF files. More...
 
 testNormalFsImage ()
 Check for UPX files. More...
 
 testNormalMultyProcess ()
 Check for multi process flag. More...
 
 testNormalEXE ()
 Check for EXE files. More...
 
 testNormalcpio ()
 Check for CPIO files. More...
 
 testNormalZst ()
 Check for ZST file. More...
 
 testNormalLz4 ()
 Check for lz4 file. More...
 
 testNormalLzma ()
 Check for lzma file. More...
 

Private Attributes

 $agentDir
 
 $ununpack
 
 $testDb
 
 $testInstaller
 

Detailed Description

Test the ununpack agent cli parameters. (Normal)

Definition at line 25 of file cliParamsTest4UnunpackNormal.php.

Member Function Documentation

◆ setUp()

cliParamsTest4Ununpack::setUp ( )

Setup test repo and db.

See also
PHPUnit_Framework_TestCase::setUp()

Definition at line 49 of file cliParamsTest4UnunpackNormal.php.

◆ tearDown()

cliParamsTest4Ununpack::tearDown ( )

Teardown test repo and db.

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 77 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalCompressedFile()

cliParamsTest4Ununpack::testNormalCompressedFile ( )

Check for Z, GZ and BZ2 files.

Test:
  1. Pass Z, GZ and BZ2 files to the agent
  2. Check if the contents of files get unpacked

Definition at line 381 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalcpio()

cliParamsTest4Ununpack::testNormalcpio ( )

Check for CPIO files.

Test:
  1. Pass a CPIO file to the agent
  2. Check if the contents of file get unpacked

Definition at line 594 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalDsc()

cliParamsTest4Ununpack::testNormalDsc ( )

Check for CAB and MSI files.

Test:
  1. Pass CAB and MSI files to the agent
  2. Check if the contents of files get unpacked
Todo:
Test not working on Xenail but pass on Trusty

Check for DSC files

Test:
  1. Pass an DSC file to the agent
  2. Check if the contents of DSC get unpacked

Definition at line 363 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalEXE()

cliParamsTest4Ununpack::testNormalEXE ( )

Check for EXE files.

Test:
  1. Pass a EXE file to the agent
  2. Check if the contents of file get unpacked

Definition at line 575 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalFsImage()

cliParamsTest4Ununpack::testNormalFsImage ( )

Check for UPX files.

Test:
  1. Pass a UPX file to the agent
  2. Check if the contents of file get unpacked
Todo:
Uncertain how the unpack results looks like

Check for disk images (file systems)

Test:
  1. Pass ext2, ext3, fat and ntfs disk images to the agent
  2. Check if the contents of images get unpacked

Definition at line 484 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalIso1()

cliParamsTest4Ununpack::testNormalIso1 ( )

Pass an iso to agent.

Command is ununpack -qCR xxxxx -d xxxxx

Test:
  1. Pass an ISO to the agent
  2. Check if it get extracted

Definition at line 111 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalIso2()

cliParamsTest4Ununpack::testNormalIso2 ( )

Pass an iso to agent.

Test:
  1. Pass an ISO to the agent
  2. Check if it get extracted

Definition at line 190 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalJar()

cliParamsTest4Ununpack::testNormalJar ( )

Check for RAR files compressed on Windows systems.

Test:
  1. Pass an RAR file to the agent compressed on windows
  2. Check if the contents of RAR get unpacked
Todo:
: failing on Travis

unpack archive lib and xx.deb/xx.udeb file

Check for archive lib and deb files

Test:
  1. Pass the files to the agent
  2. Check if the contents of files get unpacked
Todo:
Test not working on Xenail but pass on Trusty

Check for Jar files

Test:
  1. Pass a Jar file to the agent
  2. Check if the contents of Jar get unpacked

Definition at line 296 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalLz4()

cliParamsTest4Ununpack::testNormalLz4 ( )

Check for lz4 file.

unpack lz4 file

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

Definition at line 636 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalLzma()

cliParamsTest4Ununpack::testNormalLzma ( )

Check for lzma file.

unpack lzma file

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

Definition at line 660 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalMultyProcess()

cliParamsTest4Ununpack::testNormalMultyProcess ( )

Check for multi process flag.

Command is ununpack -qCR -m 10 xxxxx -d xxxxx

Test:
  1. Pass a complex file to the agent with -m flag
  2. Check if the contents of file get unpacked

Definition at line 552 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalParamI()

cliParamsTest4Ununpack::testNormalParamI ( )

Call agent with -i flag.

Test:
  1. Call agent with -i flag to initialize db
  2. Check if agent return OK

Definition at line 96 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalParamL()

cliParamsTest4Ununpack::testNormalParamL ( )

Pass a log file to the agent.

Command is ununpack -qCR xxxxx -d xxxxx -L log

Test:
  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

Definition at line 132 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalParamr()

cliParamsTest4Ununpack::testNormalParamr ( )

Check recurse flag.

Command is ununpack -qC -r 0 -d xxxxx

Test:
  1. Pass a double compressed file to the agent with -r flag
  2. Check if the agent unpack only upto depth passed

Definition at line 172 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalParamx()

cliParamsTest4Ununpack::testNormalParamx ( )

Check clean flag.

Command is ununpack -qCR -x xxxxx -d xxxxx

Test:
  1. Pass agent a compressed file and -x flag
  2. Check if the agent removed the unpacked files

Definition at line 153 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalPdf()

cliParamsTest4Ununpack::testNormalPdf ( )

Check for PDF files.

Test:
  1. Pass a PDF file to the agent
  2. Check if the contents of file get unpacked

Definition at line 450 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalRpm()

cliParamsTest4Ununpack::testNormalRpm ( )

Check for RPM files.

Test:
  1. Pass an RPM file to the agent
  2. Check if the contents of RPM get unpacked

Definition at line 206 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalTar()

cliParamsTest4Ununpack::testNormalTar ( )

Check for TAR files.

Test:
  1. Pass an TAR file to the agent
  2. Check if the contents of TAR get unpacked

Definition at line 226 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalTarball()

cliParamsTest4Ununpack::testNormalTarball ( )

Check for Z, GZ and BZ2 tarballs.

Test:
  1. Pass Z, GZ and BZ2 tarballs to the agent
  2. Check if the contents of files get unpacked

Definition at line 421 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalZip()

cliParamsTest4Ununpack::testNormalZip ( )

Check for ZIP files.

Test:
  1. Pass a ZIP file to the agent
  2. Check if the contents of ZIP get unpacked

Definition at line 313 of file cliParamsTest4UnunpackNormal.php.

◆ testNormalZst()

cliParamsTest4Ununpack::testNormalZst ( )

Check for ZST file.

unpack ZST file

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

Definition at line 612 of file cliParamsTest4UnunpackNormal.php.

Member Data Documentation

◆ $agentDir

string cliParamsTest4Ununpack::$agentDir
private

Location of agent directory

Definition at line 30 of file cliParamsTest4UnunpackNormal.php.

◆ $testDb

TestPgDb cliParamsTest4Ununpack::$testDb
private

Test db

Definition at line 39 of file cliParamsTest4UnunpackNormal.php.

◆ $testInstaller

TestInstaller cliParamsTest4Ununpack::$testInstaller
private

TestInstaller object

Definition at line 43 of file cliParamsTest4UnunpackNormal.php.

◆ $ununpack

string cliParamsTest4Ununpack::$ununpack
private

Location of agent binary

Definition at line 34 of file cliParamsTest4UnunpackNormal.php.


The documentation for this class was generated from the following file: