mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-20 01:38:41 +02:00
Fix test
This commit is contained in:
parent
f3a5e34c3f
commit
d7e68ff812
@ -6,6 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/netbirdio/netbird/client/internal/lazyconn"
|
||||
"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) {
|
||||
mock := newMockWgInterface("peer1", sc.Data, timer)
|
||||
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())
|
||||
defer cancel()
|
||||
|
Loading…
x
Reference in New Issue
Block a user