16 require_once __DIR__.
'/utility.php';
47 $this->testDb =
new TestPgDb(
'ununpackExceptional');
48 $this->agentDir = dirname(__DIR__, 4).
"/build/src/ununpack";
50 $sysConf = $this->testDb->getFossSysConf();
52 $this->testInstaller->init();
53 $this->testInstaller->install($this->agentDir);
55 $this->testDb->createSequences(array(),
true);
56 $this->testDb->createPlainTables(array(),
true);
57 $this->testDb->createInheritedTables(array());
58 $this->testDb->alterTables(array(),
true);
67 $this->testInstaller->uninstall($this->agentDir);
68 $this->testInstaller->clear();
69 $this->testInstaller->rmRepo();
82 global $TEST_DATA_PATH;
83 global $TEST_RESULT_PATH;
84 $fossology_testconfig = $this->testDb->getFossSysConf();
86 $UNUNPACK_CMD = $this->agentDir .
"/agent/ununpack";
87 if (!empty($TEST_RESULT_PATH))
88 exec(
"/bin/rm -rf $TEST_RESULT_PATH");
89 $command =
"$UNUNPACK_CMD -qCRs $TEST_DATA_PATH/test.iso -d $TEST_RESULT_PATH -c $fossology_testconfig > /dev/null 2>&1";
90 $last = exec($command, $usageOut, $rtn);
91 $this->assertNotEquals($rtn, 0);
92 $this->assertFileNotExists(
"$TEST_RESULT_PATH/test.iso.dir/test1.zip.tar.dir/test1.zip");
102 global $TEST_DATA_PATH;
103 global $TEST_RESULT_PATH;
104 $fossology_testconfig = $this->testDb->getFossSysConf();
106 $UNUNPACK_CMD = $this->agentDir .
"/agent/ununpack";
107 if (!empty($TEST_RESULT_PATH))
108 exec(
"/bin/rm -rf $TEST_RESULT_PATH");
109 $command =
"$UNUNPACK_CMD -qCR $TEST_DATA_PATH/null_file -d $TEST_RESULT_PATH -c $fossology_testconfig > /dev/null 2>&1";
110 $last = exec($command, $usageOut, $rtn);
111 $this->assertNotEquals($rtn, 0);
112 $this->assertFileNotExists(
"$TEST_RESULT_PATH/null_file.dir/");
Test the ununpack agent cli parameters. (Exceptions)
tearDown()
Teardown test repo and db.
testNullFile()
Passing null file to agent.
setUp()
Setup test repo and db.
testValidParam()
Pass an invalid flag to agent which should not run.