[Nostromo] Improve tests.

This commit is contained in:
Andrés Montañez
2017-01-08 01:11:19 -03:00
parent 89e780a0bf
commit 5bff78e1cd
4 changed files with 84 additions and 0 deletions
+5
View File
@@ -14,6 +14,7 @@ use Symfony\Component\Process\Process;
class ProcessMockup extends Process
{
public $forceFail = [];
protected $commandline;
protected $timeout;
protected $success = true;
@@ -30,6 +31,10 @@ class ProcessMockup extends Process
public function run($callback = null)
{
if (in_array($this->commandline, $this->forceFail)) {
$this->success = false;
}
if ($this->commandline == 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@host1 sh -c \"readlink -f /var/www/test/current\"') {
$this->success = false;
}