mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
@ -3,6 +3,7 @@
|
||||
namespace Tests;
|
||||
|
||||
use App\Enums\Database;
|
||||
use App\Enums\NotificationChannel;
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Enums\Webserver;
|
||||
use App\Models\Server;
|
||||
@ -31,6 +32,14 @@ public function setUp(): void
|
||||
|
||||
$this->user = User::factory()->create();
|
||||
|
||||
\App\Models\NotificationChannel::factory()->create([
|
||||
'provider' => NotificationChannel::EMAIL,
|
||||
'connected' => true,
|
||||
'data' => [
|
||||
'email' => 'user@example.com',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->setupServer();
|
||||
|
||||
$this->setupSite();
|
||||
@ -38,6 +47,15 @@ public function setUp(): void
|
||||
$this->setupKeys();
|
||||
}
|
||||
|
||||
public function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
if (File::exists(storage_path('app/key-pairs-test'))) {
|
||||
File::deleteDirectory(storage_path('app/key-pairs-test'));
|
||||
}
|
||||
}
|
||||
|
||||
private function setupServer(): void
|
||||
{
|
||||
$this->server = Server::factory()->create([
|
||||
|
Reference in New Issue
Block a user