mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
Edit & Download (local) Backups (#436)
* Allow editing of backups * pint updates * setup of backup download * allow download for local backup files * delete uploaded files on delete of BackupFile * pint updates * S3 upload & download fixes * Deletion of backup files * support $ARCH selector for s3 installation * delete files when deleting backup * fixed ui issue * adjustment * Use system temp path for downloads --------- Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
This commit is contained in:
@ -115,6 +115,43 @@ public function test_see_backups_list(): void
|
||||
->assertSee($backup->database->name);
|
||||
}
|
||||
|
||||
public function test_update_backup(): void
|
||||
{
|
||||
$this->actingAs($this->user);
|
||||
|
||||
$database = Database::factory()->create([
|
||||
'server_id' => $this->server,
|
||||
]);
|
||||
|
||||
$storage = StorageProvider::factory()->create([
|
||||
'user_id' => $this->user->id,
|
||||
'provider' => \App\Enums\StorageProvider::DROPBOX,
|
||||
]);
|
||||
|
||||
$backup = Backup::factory()->create([
|
||||
'server_id' => $this->server->id,
|
||||
'database_id' => $database->id,
|
||||
'storage_id' => $storage->id,
|
||||
'interval' => '0 * * * *',
|
||||
'keep_backups' => 5,
|
||||
]);
|
||||
|
||||
Livewire::test(BackupsList::class, [
|
||||
'server' => $this->server,
|
||||
])
|
||||
->callTableAction('edit', $backup->id, [
|
||||
'interval' => '0 0 * * *',
|
||||
'keep' => '10',
|
||||
])
|
||||
->assertSuccessful();
|
||||
|
||||
$this->assertDatabaseHas('backups', [
|
||||
'id' => $backup->id,
|
||||
'interval' => '0 0 * * *',
|
||||
'keep_backups' => 10,
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_delete_backup(): void
|
||||
{
|
||||
$this->actingAs($this->user);
|
||||
|
Reference in New Issue
Block a user