mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-20 09:06:45 +00:00
GODT-1482: Comment or mitigate panics, unlock cache when needed.
This commit is contained in:
@ -187,7 +187,8 @@ func (mocks *mocksForStore) newStoreNoEvents(t *testing.T, combinedMode bool, ms
|
||||
|
||||
mocks.user.EXPECT().GetClient().AnyTimes().Return(mocks.client)
|
||||
|
||||
mocks.client.EXPECT().GetUserKeyRing().Return(tests.MakeKeyRing(t), nil).AnyTimes()
|
||||
testUserKeyring := tests.MakeKeyRing(t)
|
||||
mocks.client.EXPECT().GetUserKeyRing().Return(testUserKeyring, nil).AnyTimes()
|
||||
mocks.client.EXPECT().Addresses().Return(pmapi.AddressList{
|
||||
{ID: addrID1, Email: addr1, Type: pmapi.OriginalAddress, Receive: true},
|
||||
{ID: addrID2, Email: addr2, Type: pmapi.AliasAddress, Receive: true},
|
||||
@ -225,6 +226,8 @@ func (mocks *mocksForStore) newStoreNoEvents(t *testing.T, combinedMode bool, ms
|
||||
)
|
||||
require.NoError(mocks.tb, err)
|
||||
|
||||
require.NoError(mocks.tb, mocks.store.UnlockCache(testUserKeyring))
|
||||
|
||||
// We want to wait until first sync has finished.
|
||||
// Checking that event after sync was reuested is not the best way to
|
||||
// do the check, because sync could take more time, but sync is going
|
||||
|
||||
Reference in New Issue
Block a user