fix phpunit-tests for dev-versions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
use Froxlor\Api\Commands\Froxlor;
|
use Froxlor\Api\Commands\Froxlor;
|
||||||
@@ -19,6 +20,10 @@ class FroxlorTest extends TestCase
|
|||||||
$json_result = Froxlor::getLocal($admin_userdata)->checkUpdate();
|
$json_result = Froxlor::getLocal($admin_userdata)->checkUpdate();
|
||||||
$result = json_decode($json_result, true)['data'];
|
$result = json_decode($json_result, true)['data'];
|
||||||
$this->assertEquals(0, $result['isnewerversion']);
|
$this->assertEquals(0, $result['isnewerversion']);
|
||||||
|
if (defined('DEV_FROXLOR') && DEV_FROXLOR == 1) {
|
||||||
|
$this->assertEquals("You already have the latest testing version of Froxlor installed.", $result['additional_info']);
|
||||||
|
} else {
|
||||||
$this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']);
|
$this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
define('DEV_FROXLOR', 1);
|
||||||
|
|
||||||
if (file_exists('/etc/froxlor-test.pwd') && file_exists('/etc/froxlor-test.rpwd')) {
|
if (file_exists('/etc/froxlor-test.pwd') && file_exists('/etc/froxlor-test.rpwd')) {
|
||||||
// froxlor jenkins test-system
|
// froxlor jenkins test-system
|
||||||
$pwd = trim(file_get_contents('/etc/froxlor-test.pwd'));
|
$pwd = trim(file_get_contents('/etc/froxlor-test.pwd'));
|
||||||
|
|||||||
Reference in New Issue
Block a user