mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-18 02:50:43 +02:00
Fix test
This commit is contained in:
@@ -6,6 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/netbirdio/netbird/client/internal/lazyconn"
|
||||||
"github.com/netbirdio/netbird/util"
|
"github.com/netbirdio/netbird/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -23,7 +26,11 @@ func TestNewManager(t *testing.T) {
|
|||||||
t.Run(fmt.Sprintf("Scenario %d", i), func(t *testing.T) {
|
t.Run(fmt.Sprintf("Scenario %d", i), func(t *testing.T) {
|
||||||
mock := newMockWgInterface("peer1", sc.Data, timer)
|
mock := newMockWgInterface("peer1", sc.Data, timer)
|
||||||
manager := NewManager(mock)
|
manager := NewManager(mock)
|
||||||
manager.AddPeer("peer1")
|
peerCfg := &lazyconn.PeerConfig{
|
||||||
|
PublicKey: "peer1",
|
||||||
|
Log: log.WithField("peer", "peer1"),
|
||||||
|
}
|
||||||
|
manager.AddPeer(peerCfg)
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
Reference in New Issue
Block a user