add unit tests

This commit is contained in:
Tim Möhlmann 2023-02-28 19:58:08 +02:00
parent b5d2050c2a
commit 5cd0653c33
5 changed files with 278 additions and 25 deletions

View file

@ -784,6 +784,10 @@ func (s *Storage) StoreDeviceAuthorization(ctx context.Context, clientID, device
}
func (s *Storage) GetDeviceAuthorizatonState(ctx context.Context, clientID, deviceCode string) (*op.DeviceAuthorizationState, error) {
if ctx.Err() != nil {
return nil, ctx.Err()
}
s.lock.Lock()
defer s.lock.Unlock()