refactoring (#116)

- refactoring architecture
- fix incomplete ssh logs
- code editor for scripts in the app
- remove Jobs and SSHCommands
This commit is contained in:
Saeed Vaziry
2024-03-14 20:03:43 +01:00
committed by GitHub
parent cee4a70c3c
commit 428140b931
472 changed files with 24110 additions and 8159 deletions

View File

@ -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,
]);
}
}