mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-20 09:47:49 +02:00
Fix test
This commit is contained in:
parent
f3a5e34c3f
commit
d7e68ff812
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user