mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 10:18:20 +00:00
feat(ui): Shadow UI redesign, domain management, and DNS autoconfigure (#11119)
Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com>
This commit is contained in:
1 parent
0b843bb07c
commit
8ae56587d5
497 files changed
+44045
-22630
No files matched your search
@@ -171,7 +171,7 @@ it('splits standalone database backup settings and executions across dedicated u
|
||||
|
||||
$this->get($generalUrl.'/s3')
|
||||
->assertOk()
|
||||
->assertSeeText('No validated S3 available. Configure one here.')
|
||||
->assertSeeText('No validated S3 storage')
|
||||
->assertDontSee('Disable Local Backup')
|
||||
->assertDontSee('Enable S3')
|
||||
->assertDontSee('Disable S3')
|
||||
@@ -264,6 +264,68 @@ it('redirects to executions after queuing a database backup with unusable S3 sto
|
||||
Queue::assertPushed(DatabaseBackupJob::class);
|
||||
});
|
||||
|
||||
it('queues instance database backup without redirecting when project context is missing', function () {
|
||||
Queue::fake();
|
||||
|
||||
$rootTeam = Team::find(0) ?? Team::factory()->create(['id' => 0]);
|
||||
$this->user->teams()->syncWithoutDetaching([$rootTeam->id => ['role' => 'owner']]);
|
||||
session(['currentTeam' => $rootTeam]);
|
||||
|
||||
$server = Server::factory()->create([
|
||||
'id' => 0,
|
||||
'team_id' => $rootTeam->id,
|
||||
'ip' => '127.0.0.1',
|
||||
]);
|
||||
$destination = StandaloneDocker::where('server_id', $server->id)->first()
|
||||
?? StandaloneDocker::create([
|
||||
'id' => 0,
|
||||
'name' => 'coolify',
|
||||
'uuid' => (string) str()->uuid(),
|
||||
'network' => 'coolify',
|
||||
'server_id' => $server->id,
|
||||
]);
|
||||
|
||||
$database = new StandalonePostgresql;
|
||||
$database->forceFill([
|
||||
'id' => 0,
|
||||
'name' => 'coolify-db',
|
||||
'description' => 'Coolify database',
|
||||
'postgres_user' => 'coolify',
|
||||
'postgres_password' => 'password',
|
||||
'postgres_db' => 'coolify',
|
||||
'status' => 'running',
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'destination_id' => $destination->id,
|
||||
'environment_id' => null,
|
||||
]);
|
||||
$database->save();
|
||||
|
||||
expect($database->project())->toBeNull()
|
||||
->and($database->environment)->toBeNull();
|
||||
|
||||
$backup = ScheduledDatabaseBackup::create([
|
||||
'id' => 0,
|
||||
'enabled' => true,
|
||||
'save_s3' => false,
|
||||
'frequency' => '0 0 * * *',
|
||||
'database_type' => StandalonePostgresql::class,
|
||||
'database_id' => $database->id,
|
||||
'team_id' => $rootTeam->id,
|
||||
'timeout' => 3600,
|
||||
]);
|
||||
|
||||
Livewire::test(BackupEdit::class, [
|
||||
'backup' => $backup->fresh(),
|
||||
'availableS3Storages' => collect(),
|
||||
])
|
||||
->call('backupNow')
|
||||
->assertDispatched('success', 'Backup queued. It will be available in a few minutes.')
|
||||
->assertNoRedirect()
|
||||
->assertHasNoErrors();
|
||||
|
||||
Queue::assertPushed(DatabaseBackupJob::class);
|
||||
});
|
||||
|
||||
it('disables S3 backup when saved without a selected S3 storage', function () {
|
||||
$backup = createBackupForEditValidationTest($this->team);
|
||||
|
||||
@@ -366,10 +428,10 @@ it('shows only an empty S3 state when no storages are available', function () {
|
||||
]);
|
||||
|
||||
Livewire::test(BackupEdit::class, ['backup' => $backup->fresh(), 'availableS3Storages' => $this->team->s3s, 'section' => 's3'])
|
||||
->assertSeeHtml('<h2>S3</h2>')
|
||||
->assertSeeText('No validated S3 available. Configure one here.')
|
||||
->assertSeeHtml('<h2>S3 storage</h2>')
|
||||
->assertSeeText('No validated S3 storage')
|
||||
->assertSeeHtml('href="'.route('storage.index').'"')
|
||||
->assertSeeHtml('>here</a>')
|
||||
->assertSeeText('Open S3 storage')
|
||||
->assertDontSee('Save')
|
||||
->assertDontSee('Enable S3')
|
||||
->assertDontSee('Disable S3')
|
||||
@@ -390,7 +452,7 @@ it('allows S3 backups to be disabled when no usable storage remains', function (
|
||||
'section' => 's3',
|
||||
])
|
||||
->assertSet('saveS3', true)
|
||||
->assertSeeText('No validated S3 available. Configure one here.')
|
||||
->assertSeeText('No validated S3 storage')
|
||||
->assertDontSee('Disable S3')
|
||||
->call('toggleS3')
|
||||
->assertDispatched('success')
|
||||
|
||||
Reference in new issue
Block a user