mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
refactoring (#116)
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\QueueStatus;
|
||||
use App\Facades\SSH;
|
||||
use App\Models\Queue;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
@ -32,6 +33,8 @@ public function test_see_queues()
|
||||
|
||||
public function test_delete_queue()
|
||||
{
|
||||
SSH::fake();
|
||||
|
||||
$this->actingAs($this->user);
|
||||
|
||||
$queue = Queue::factory()->create([
|
||||
@ -47,14 +50,15 @@ public function test_delete_queue()
|
||||
])
|
||||
)->assertRedirect();
|
||||
|
||||
$this->assertDatabaseHas('queues', [
|
||||
$this->assertDatabaseMissing('queues', [
|
||||
'id' => $queue->id,
|
||||
'status' => QueueStatus::DELETING,
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_create_queue()
|
||||
{
|
||||
SSH::fake();
|
||||
|
||||
$this->actingAs($this->user);
|
||||
|
||||
$this->post(
|
||||
@ -79,7 +83,7 @@ public function test_create_queue()
|
||||
'auto_start' => 1,
|
||||
'auto_restart' => 1,
|
||||
'numprocs' => 1,
|
||||
'status' => QueueStatus::CREATING,
|
||||
'status' => QueueStatus::RUNNING,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user