mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 17:10:29 +00:00
Update DockerTest.php
This commit is contained in:
parent
7fd6dfb6f2
commit
8d052a4121
1 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
namespace tests\Unit;
|
namespace tests\Unit;
|
||||||
|
|
||||||
use App\Filament\Pages\Modules;
|
use App\Filament\Pages\Modules;
|
||||||
|
use App\Models\Module;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Filament\Actions\DeleteAction;
|
use Filament\Actions\DeleteAction;
|
||||||
use Livewire\Livewire;
|
use Livewire\Livewire;
|
||||||
|
@ -27,7 +28,8 @@ class DockerTest extends TestCase
|
||||||
$installLogFilePath = $modulesTest->get('installLogFilePath');
|
$installLogFilePath = $modulesTest->get('installLogFilePath');
|
||||||
|
|
||||||
$dockerIsInstalled = false;
|
$dockerIsInstalled = false;
|
||||||
for ($i = 0; $i < 50; $i++) {
|
for ($i = 0; $i < 400; $i++) {
|
||||||
|
$modulesTest->call('getInstallLog');
|
||||||
$logFile = file_get_contents($installLogFilePath);
|
$logFile = file_get_contents($installLogFilePath);
|
||||||
if (strpos($logFile, 'Done!') !== false) {
|
if (strpos($logFile, 'Done!') !== false) {
|
||||||
$dockerIsInstalled = true;
|
$dockerIsInstalled = true;
|
||||||
|
@ -37,6 +39,9 @@ class DockerTest extends TestCase
|
||||||
}
|
}
|
||||||
$this->assertTrue($dockerIsInstalled);
|
$this->assertTrue($dockerIsInstalled);
|
||||||
|
|
||||||
|
$findModule = Module::where('name', 'Docker')->first();
|
||||||
|
$this->assertNotEmpty($findModule);
|
||||||
|
|
||||||
$this->actingAs(User::factory()->create());
|
$this->actingAs(User::factory()->create());
|
||||||
|
|
||||||
$dockerImage = 'nginx';
|
$dockerImage = 'nginx';
|
||||||
|
|
Loading…
Reference in a new issue