GODT-1351: Cache and update of space bytes in user object.

This commit is contained in:
Jakub
2021-09-21 14:54:15 +02:00
parent 41e15db442
commit 2899e7bb15
27 changed files with 243 additions and 49 deletions

View File

@ -116,9 +116,14 @@ var (
IsCombinedAddressMode: false,
}
usedSpace = int64(1048576)
maxSpace = int64(10485760)
testPMAPIUser = &pmapi.User{ //nolint[gochecknoglobals]
ID: "user",
Name: "username",
ID: "user",
Name: "username",
UsedSpace: &usedSpace,
MaxSpace: &maxSpace,
}
testPMAPIUserDisconnected = &pmapi.User{ //nolint[gochecknoglobals]
@ -297,6 +302,7 @@ func mockInitConnectedUser(t *testing.T, m mocks) {
// Mock of user initialisation.
m.pmapiClient.EXPECT().AddAuthRefreshHandler(gomock.Any())
m.pmapiClient.EXPECT().IsUnlocked().Return(true).AnyTimes()
m.pmapiClient.EXPECT().GetUser(gomock.Any()).Return(testPMAPIUser, nil) // load connected user
// Mock of store initialisation.
gomock.InOrder(