Queue improvements

This commit is contained in:
Dmitry Khomutov 2017-02-01 21:53:31 +07:00
commit 7e735bbb3b
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
18 changed files with 65 additions and 43 deletions

View file

@ -107,7 +107,7 @@ class InstallCommandTest extends \PHPUnit_Framework_TestCase
'--admin-name' => 'admin',
'--admin-pass' => 'admin-password',
'--url' => 'http://php-censor.local',
'--queue-disabled' => null,
'--queue-use' => null,
];
if (!is_null($exclude)) {

View file

@ -43,7 +43,7 @@ class BuildTest extends \PHPUnit_Framework_TestCase
public function testExecute_TestIsSuccessful()
{
$build = new Build();
$build->setStatus(Build::STATUS_NEW);
$build->setStatus(Build::STATUS_PENDING);
$this->assertFalse($build->isSuccessful());
$build->setStatus(Build::STATUS_RUNNING);

View file

@ -50,7 +50,7 @@ class BuildServiceTest extends \PHPUnit_Framework_TestCase
$returnValue = $this->testedService->createBuild($project);
$this->assertEquals(101, $returnValue->getProjectId());
$this->assertEquals(Build::STATUS_NEW, $returnValue->getStatus());
$this->assertEquals(Build::STATUS_PENDING, $returnValue->getStatus());
$this->assertNull($returnValue->getStarted());
$this->assertNull($returnValue->getFinished());
$this->assertNull($returnValue->getLog());
@ -108,7 +108,7 @@ class BuildServiceTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($build->getProjectId(), $returnValue->getProjectId());
$this->assertEquals($build->getCommitId(), $returnValue->getCommitId());
$this->assertNotEquals($build->getStatus(), $returnValue->getStatus());
$this->assertEquals(Build::STATUS_NEW, $returnValue->getStatus());
$this->assertEquals(Build::STATUS_PENDING, $returnValue->getStatus());
$this->assertNull($returnValue->getLog());
$this->assertEquals($build->getBranch(), $returnValue->getBranch());
$this->assertNotEquals($build->getCreated(), $returnValue->getCreated());

View file

@ -80,7 +80,7 @@ class BuildStatusServiceTest extends \PHPUnit_Framework_TestCase
'previousBuild' => null,
],
'5' => [
'status' => Build::STATUS_NEW,
'status' => Build::STATUS_PENDING,
'id' => 1000,
'finishDateTime' => '2014-12-25 21:12:21',
'previousBuild' => 3,