feat(GODT-2835): Bump GPA adding support for AsyncAttachments for BugReport +...

This commit is contained in:
Romain Le Jeune
2023-10-03 13:43:16 +00:00
parent 1c344211d1
commit de0b6c0737
13 changed files with 20 additions and 18 deletions

View File

@ -102,13 +102,13 @@ func (s *Service) CheckAuth(ctx context.Context, email string, password []byte)
})
}
func (s *Service) HandleUsedSpaceEvent(ctx context.Context, newSpace int) error {
func (s *Service) HandleUsedSpaceEvent(ctx context.Context, newSpace int64) error {
s.log.Info("Handling User Space Changed event")
if s.identity.OnUserSpaceChanged(newSpace) {
if s.identity.OnUserSpaceChanged(uint64(newSpace)) {
s.eventPublisher.PublishEvent(ctx, events.UsedSpaceChanged{
UserID: s.identity.User.ID,
UsedSpace: newSpace,
UsedSpace: uint64(newSpace),
})
}

View File

@ -54,7 +54,7 @@ func TestService_OnUserSpaceChanged(t *testing.T) {
// New value, event should be published.
require.NoError(t, service.HandleUsedSpaceEvent(context.Background(), 1024))
require.Equal(t, 1024, service.identity.User.UsedSpace)
require.Equal(t, uint64(1024), service.identity.User.UsedSpace)
}
func TestService_OnRefreshEvent(t *testing.T) {

View File

@ -119,7 +119,7 @@ func (s *State) OnRefreshEvent(ctx context.Context) error {
return nil
}
func (s *State) OnUserSpaceChanged(value int) bool {
func (s *State) OnUserSpaceChanged(value uint64) bool {
if s.User.UsedSpace == value {
return false
}