Skip to content

Commit d338507

Browse files
committed
Impl mock for test
1 parent 6ae7487 commit d338507

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

adnl/rldp/client_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"context"
66
"crypto/ed25519"
77
"crypto/rand"
8+
"crypto/sha256"
89
"encoding/hex"
910
"errors"
1011
"github.com/xssnick/raptorq"
@@ -37,8 +38,8 @@ func (m MockADNL) GetCloserCtx() context.Context {
3738
}
3839

3940
func (m MockADNL) GetID() []byte {
40-
//TODO implement me
41-
panic("implement me")
41+
v := sha256.Sum256([]byte("1.1.1.1:1234"))
42+
return v[:]
4243
}
4344

4445
func (m MockADNL) RemoteAddr() string {

ton/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func TestAPIClient_GetBlockData(t *testing.T) {
124124
func TestAPIClient_GetOldBlockData(t *testing.T) {
125125
client := liteclient.NewConnectionPool()
126126

127-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
127+
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
128128
defer cancel()
129129

130130
err := client.AddConnection(ctx, "135.181.177.59:53312", "aF91CuUHuuOv9rm2W5+O/4h38M3sRm40DtSdRxQhmtQ=")

0 commit comments

Comments
 (0)