mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-22 12:07:04 +00:00
Refactor retention scanner prior to starting #12
This commit is contained in:
@@ -36,7 +36,12 @@ func TestDoRetentionScan(t *testing.T) {
|
||||
mb3.On("GetMessages").Return([]Message{new3}, nil)
|
||||
|
||||
// Test 4 hour retention
|
||||
if err := doRetentionScan(mds, 4*time.Hour-time.Minute, 0); err != nil {
|
||||
rs := &RetentionScanner{
|
||||
ds: mds,
|
||||
retentionPeriod: 4*time.Hour - time.Minute,
|
||||
retentionSleep: 0,
|
||||
}
|
||||
if err := rs.doScan(); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user