forked from Silverfish/proton-bridge
refactor: don't pass client directly to store syncer
This commit is contained in:
@ -178,7 +178,7 @@ func TestSyncAllMail(t *testing.T) { //nolint[funlen]
|
||||
}
|
||||
syncState := newSyncState(store, 0, tc.idRanges, tc.idsToBeDeleted)
|
||||
|
||||
err := syncAllMail(m.panicHandler, store, api, syncState)
|
||||
err := syncAllMail(m.panicHandler, store, func() messageLister { return api }, syncState)
|
||||
require.Nil(t, err)
|
||||
|
||||
// Check all messages were created or updated.
|
||||
@ -226,7 +226,7 @@ func TestSyncAllMail_FailedListing(t *testing.T) {
|
||||
}
|
||||
syncState := newTestSyncState(store)
|
||||
|
||||
err := syncAllMail(m.panicHandler, store, api, syncState)
|
||||
err := syncAllMail(m.panicHandler, store, func() messageLister { return api }, syncState)
|
||||
require.EqualError(t, err, "failed to sync group: failed to list messages: error")
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ func TestSyncAllMail_FailedCreateOrUpdateMessage(t *testing.T) {
|
||||
}
|
||||
syncState := newTestSyncState(store)
|
||||
|
||||
err := syncAllMail(m.panicHandler, store, api, syncState)
|
||||
err := syncAllMail(m.panicHandler, store, func() messageLister { return api }, syncState)
|
||||
require.EqualError(t, err, "failed to sync group: failed to create or update messages: error")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user