[Web][Rspamd] Keep the global archive switch in Redis only

This commit is contained in:
FreddleSpl0it committed 2026-11-09 01:09:43 +01:00
1 parent 2fc6868b72
commit c48691fca7
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');