mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-09 18:26:20 +00:00
[Web][Restic][Dovecot][Dockerapi] Add restic backups with restore in the UI
- Scheduled, encrypted backups to S3, SFTP, REST or a local folder (new restic-mailcow container) - Restore of mailboxes and whole domains in the UI, also deleted ones, for admins and domain admins - Scope set by RESTIC_BACKUP_MODE in mailcow.conf (all, data, config) - Optional backup before updates (update.sh), helper-scripts/restic.sh for a full restore
This commit is contained in:
66 files changed
+15214
-97
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Mailcow\Tests\Backup\Legacy;
|
||||
|
||||
use Mailcow\Backup\Legacy\NoTemplates;
|
||||
use Mailcow\MailboxGroup\Repository\LookupRepository;
|
||||
use Mailcow\MailboxGroup\Service\TemplateService;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class NoTemplatesTest extends TestCase
|
||||
{
|
||||
public function testARestoredMembershipAppliesNoGroupTemplate(): void
|
||||
{
|
||||
$lookup = $this->createMock(LookupRepository::class);
|
||||
// the mailbox gets a group with a template
|
||||
$lookup->method('effectiveTemplates')->willReturn(['anna@firma.de' => 'Vertrieb']);
|
||||
$lookup->method('mailboxNames')->willReturn(['anna@firma.de' => 'Anna']);
|
||||
|
||||
// the legacy mailbox code is never called (it is not loaded in the tests)
|
||||
$this->assertSame([], (new TemplateService($lookup, new NoTemplates()))->applyChanged(['anna@firma.de' => null]));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user