mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
fix(backups): render form for directory-only targets (#11332)
This commit is contained in:
1 parent
5152698757
commit
db1316f878
2 files changed
+13
-1
No files matched your search
@@ -222,6 +222,18 @@ it('creates a scheduled backup for a preselected application directory', functio
|
||||
expect(ScheduledVolumeBackup::query()->sole()->backupable->is($directory))->toBeTrue();
|
||||
});
|
||||
|
||||
it('renders the backup form for an application with only a directory target', function () {
|
||||
$team = Team::factory()->create();
|
||||
signInForVolumeBackups($this, $team);
|
||||
[$application, $volume] = createVolumeBackupApplication($team);
|
||||
$volume->delete();
|
||||
$directory = createApplicationBackupDirectory($application);
|
||||
|
||||
Livewire::test(CreateScheduledVolumeBackup::class, ['application' => $application])
|
||||
->assertSet('targetKey', 'directory:'.$directory->id)
|
||||
->assertSuccessful();
|
||||
});
|
||||
|
||||
it('rejects files and directory mounts owned by another application as backup targets', function () {
|
||||
$team = Team::factory()->create();
|
||||
signInForVolumeBackups($this, $team);
|
||||
|
||||
Reference in new issue
Block a user