mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-09 02:13:38 +00:00
[Web][Rspamd] Keep the global archive switch in Redis only
This commit is contained in:
15 files changed
+78
-55
No files matched your search
@@ -24,12 +24,12 @@ class StatusServiceTest extends TestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->redis = new FakeRedis();
|
||||
$this->redis->strings['ARCHIVE_ENABLED'] = '1';
|
||||
}
|
||||
|
||||
private function service(?Context $context = null): StatusService
|
||||
{
|
||||
$settings = new Settings();
|
||||
$settings->enabled = true;
|
||||
$settings->address = 'journal@archive.example';
|
||||
$settings->profile = 'none';
|
||||
$repo = $this->createStub(SettingsRepository::class);
|
||||
@@ -70,6 +70,12 @@ class StatusServiceTest extends TestCase
|
||||
], $this->service()->status());
|
||||
}
|
||||
|
||||
public function testSwitchFromRedis(): void
|
||||
{
|
||||
$this->redis->strings['ARCHIVE_ENABLED'] = '0';
|
||||
$this->assertSame(0, $this->service()->status()['enabled']);
|
||||
}
|
||||
|
||||
public function testLogWithMessageIds(): void
|
||||
{
|
||||
(new ArchiveState($this->redis))->dropped('4XyZ1', 'owner lookup failed', 'm1@firma.de');
|
||||
|
||||
Reference in new issue
Block a user