mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
GO-3921: fix comments
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
parent
2c6e57ea1e
commit
fac7c4f8fb
2 changed files with 5 additions and 5 deletions
|
@ -112,7 +112,7 @@ func (s *service) updateConfiguration(ctx context.Context) (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
if err = s.updateCompatibilityStatus(ctx, err); err != nil {
|
||||
if err = s.updateCompatibilityStatus(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ func (s *service) updateConfiguration(ctx context.Context) (err error) {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *service) updateCompatibilityStatus(ctx context.Context, err error) error {
|
||||
func (s *service) updateCompatibilityStatus(ctx context.Context) error {
|
||||
needsUpdate, checkErr := s.networkProtoVersionChecker.IsNetworkNeedsUpdate(ctx)
|
||||
if checkErr != nil {
|
||||
return checkErr
|
||||
|
@ -131,9 +131,9 @@ func (s *service) updateCompatibilityStatus(ctx context.Context, err error) erro
|
|||
if needsUpdate {
|
||||
s.setCompatibilityStatus(NetworkCompatibilityStatusNeedsUpdate)
|
||||
} else {
|
||||
s.setCompatibilityStatusByErr(err)
|
||||
s.setCompatibilityStatus(NetworkCompatibilityStatusOk)
|
||||
}
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *service) saveAndSetLastConfiguration(ctx context.Context, last Configuration) error {
|
||||
|
|
|
@ -68,7 +68,7 @@ func TestService_NetworkCompatibilityStatus(t *testing.T) {
|
|||
defer fx.finish(t)
|
||||
fx.run(t)
|
||||
time.Sleep(time.Millisecond * 10)
|
||||
assert.Equal(t, NetworkCompatibilityStatusError, fx.NetworkCompatibilityStatus())
|
||||
assert.Equal(t, NetworkCompatibilityStatusOk, fx.NetworkCompatibilityStatus())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue