fix phpunit-tests for dev-versions

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-04-01 10:36:27 +02:00
parent eacf383928
commit ef04d6532a
2 changed files with 9 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
<?php
use PHPUnit\Framework\TestCase;
use Froxlor\Api\Commands\Froxlor;
@@ -19,6 +20,10 @@ class FroxlorTest extends TestCase
$json_result = Froxlor::getLocal($admin_userdata)->checkUpdate();
$result = json_decode($json_result, true)['data'];
$this->assertEquals(0, $result['isnewerversion']);
$this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']);
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']);
}
}
}

View File

@@ -1,4 +1,7 @@
<?php
define('DEV_FROXLOR', 1);
if (file_exists('/etc/froxlor-test.pwd') && file_exists('/etc/froxlor-test.rpwd')) {
// froxlor jenkins test-system
$pwd = trim(file_get_contents('/etc/froxlor-test.pwd'));