From e7cec4c7c5ae1f12566f85d36fbb1a8209c43826 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Tue, 30 Apr 2024 01:10:08 +0300 Subject: [PATCH] Update DockerTest.php --- web/tests/Unit/DockerTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/tests/Unit/DockerTest.php b/web/tests/Unit/DockerTest.php index 1675744..42a0a2d 100644 --- a/web/tests/Unit/DockerTest.php +++ b/web/tests/Unit/DockerTest.php @@ -2,6 +2,7 @@ namespace tests\Unit; +use App\Filament\Pages\Modules; use App\Models\User; use Filament\Actions\DeleteAction; use Livewire\Livewire; @@ -20,13 +21,14 @@ class DockerTest extends TestCase ini_set('memory_limit', '-1'); ini_set('max_execution_time', 0); - $docker = new PostInstall(); - $docker->setLogFile('/tmp/phyrepanel-docker-install.log'); - $docker->run(); + $modulesTest = Livewire::test(Modules::class); + $modulesTest->call('openInstallModal', 'Docker'); + + $installLogFilePath = $modulesTest->get('installLogFilePath'); $dockerIsInstalled = false; 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) { $dockerIsInstalled = true; break;