mirror of
https://github.com/vitodeploy/vito.git
synced 2025-06-30 21:46:16 +00:00
Feature/add remote server logs (#159)
This commit is contained in:
@ -23,4 +23,37 @@ public function test_see_logs()
|
||||
->assertSuccessful()
|
||||
->assertSeeText($log->type);
|
||||
}
|
||||
|
||||
public function test_see_logs_remote()
|
||||
{
|
||||
$this->actingAs($this->user);
|
||||
|
||||
/** @var ServerLog $log */
|
||||
$log = ServerLog::factory()->create([
|
||||
'server_id' => $this->server->id,
|
||||
'is_remote' => true,
|
||||
'type' => 'remote',
|
||||
'name' => 'see-remote-log',
|
||||
]);
|
||||
|
||||
$this->get(route('servers.logs.remote', $this->server))
|
||||
->assertSuccessful()
|
||||
->assertSeeText('see-remote-log');
|
||||
}
|
||||
|
||||
public function test_create_remote_log()
|
||||
{
|
||||
$this->actingAs($this->user);
|
||||
|
||||
$this->post(route('servers.logs.remote.store', [
|
||||
'server' => $this->server->id,
|
||||
]), [
|
||||
'path' => 'test-path',
|
||||
])->assertOk();
|
||||
|
||||
$this->assertDatabaseHas('server_logs', [
|
||||
'is_remote' => true,
|
||||
'name' => 'test-path',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user