1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

GO-3170: add pick function

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
AnastasiaShemyakinskaya 2024-05-28 15:03:17 +02:00
parent 7336db3206
commit a2b8442749
No known key found for this signature in database
GPG key ID: CCD60ED83B103281
5 changed files with 61 additions and 16 deletions

View file

@ -3,7 +3,6 @@ package commonspace
import (
"context"
"fmt"
"github.com/anyproto/any-sync/commonspace/peerstatus"
"testing"
"time"
@ -229,6 +228,10 @@ func (m *mockPool) DialOneOf(ctx context.Context, peerIds []string) (peer.Peer,
return nil, fmt.Errorf("can't dial peer")
}
func (m *mockPool) Pick(ctx context.Context, id string) (peer.Peer, error) {
return nil, fmt.Errorf("no such peer")
}
//
// Mock Config
//
@ -473,9 +476,9 @@ func (m mockPeerStatus) Close(ctx context.Context) (err error) {
return
}
func (m mockPeerStatus) SendPeerUpdate() {}
func (m mockPeerStatus) CheckPeerStatus() {}
func (m mockPeerStatus) SendNewStatus(status peerstatus.Status) {}
func (m mockPeerStatus) SendNotPossibleStatus() {}
//
// Space fixture