1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-01-10 13:15:56 +00:00

Finishing up index.gob work

- Wrote more unit tests to make sure filestore behaves as expected
 - Renamed NewFileDataStore to DefaultFileDataStore, implemented a new
   NewFileDataStore for unit tests.
 - filestore now removes entire mailbox dir when last message is deleted
This commit is contained in:
James Hillyerd
2013-10-13 11:46:20 -07:00
parent 08f16db7ac
commit 52771e19b6
6 changed files with 151 additions and 35 deletions

View File

@@ -23,7 +23,7 @@ type Server struct {
// Init a new Server object
func New() *Server {
// TODO is two filestores better/worse than sharing w/ smtpd?
ds := smtpd.NewFileDataStore()
ds := smtpd.DefaultFileDataStore()
cfg := config.GetPop3Config()
return &Server{domain: cfg.Domain, dataStore: ds, maxIdleSeconds: cfg.MaxIdleSeconds,
waitgroup: new(sync.WaitGroup)}