mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 07:30:25 +00:00
Update DockerTest.php
This commit is contained in:
parent
ac3abe3e94
commit
e7cec4c7c5
1 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace tests\Unit;
|
namespace tests\Unit;
|
||||||
|
|
||||||
|
use App\Filament\Pages\Modules;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Filament\Actions\DeleteAction;
|
use Filament\Actions\DeleteAction;
|
||||||
use Livewire\Livewire;
|
use Livewire\Livewire;
|
||||||
|
@ -20,13 +21,14 @@ class DockerTest extends TestCase
|
||||||
ini_set('memory_limit', '-1');
|
ini_set('memory_limit', '-1');
|
||||||
ini_set('max_execution_time', 0);
|
ini_set('max_execution_time', 0);
|
||||||
|
|
||||||
$docker = new PostInstall();
|
$modulesTest = Livewire::test(Modules::class);
|
||||||
$docker->setLogFile('/tmp/phyrepanel-docker-install.log');
|
$modulesTest->call('openInstallModal', 'Docker');
|
||||||
$docker->run();
|
|
||||||
|
$installLogFilePath = $modulesTest->get('installLogFilePath');
|
||||||
|
|
||||||
$dockerIsInstalled = false;
|
$dockerIsInstalled = false;
|
||||||
for ($i = 0; $i < 50; $i++) {
|
for ($i = 0; $i < 50; $i++) {
|
||||||
$logFile = file_get_contents('/tmp/phyrepanel-docker-install.log');
|
$logFile = file_get_contents($installLogFilePath);
|
||||||
if (strpos($logFile, 'Done!') !== false) {
|
if (strpos($logFile, 'Done!') !== false) {
|
||||||
$dockerIsInstalled = true;
|
$dockerIsInstalled = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue