diff --git a/management/server/policy_test.go b/management/server/policy_test.go index 3ed08f4e6..e4874d99d 100644 --- a/management/server/policy_test.go +++ b/management/server/policy_test.go @@ -15,36 +15,44 @@ func TestAccount_getPeersByPolicy(t *testing.T) { account := &Account{ Peers: map[string]*nbpeer.Peer{ "peerA": { - ID: "peerA", - IP: net.ParseIP("100.65.14.88"), + ID: "peerA", + IP: net.ParseIP("100.65.14.88"), + Status: &nbpeer.PeerStatus{}, }, "peerB": { - ID: "peerB", - IP: net.ParseIP("100.65.80.39"), + ID: "peerB", + IP: net.ParseIP("100.65.80.39"), + Status: &nbpeer.PeerStatus{}, }, "peerC": { - ID: "peerC", - IP: net.ParseIP("100.65.254.139"), + ID: "peerC", + IP: net.ParseIP("100.65.254.139"), + Status: &nbpeer.PeerStatus{}, }, "peerD": { - ID: "peerD", - IP: net.ParseIP("100.65.62.5"), + ID: "peerD", + IP: net.ParseIP("100.65.62.5"), + Status: &nbpeer.PeerStatus{}, }, "peerE": { - ID: "peerE", - IP: net.ParseIP("100.65.32.206"), + ID: "peerE", + IP: net.ParseIP("100.65.32.206"), + Status: &nbpeer.PeerStatus{}, }, "peerF": { - ID: "peerF", - IP: net.ParseIP("100.65.250.202"), + ID: "peerF", + IP: net.ParseIP("100.65.250.202"), + Status: &nbpeer.PeerStatus{}, }, "peerG": { - ID: "peerG", - IP: net.ParseIP("100.65.13.186"), + ID: "peerG", + IP: net.ParseIP("100.65.13.186"), + Status: &nbpeer.PeerStatus{}, }, "peerH": { - ID: "peerH", - IP: net.ParseIP("100.65.29.55"), + ID: "peerH", + IP: net.ParseIP("100.65.29.55"), + Status: &nbpeer.PeerStatus{}, }, }, Groups: map[string]*Group{ @@ -259,16 +267,19 @@ func TestAccount_getPeersByPolicyDirect(t *testing.T) { account := &Account{ Peers: map[string]*nbpeer.Peer{ "peerA": { - ID: "peerA", - IP: net.ParseIP("100.65.14.88"), + ID: "peerA", + IP: net.ParseIP("100.65.14.88"), + Status: &nbpeer.PeerStatus{}, }, "peerB": { - ID: "peerB", - IP: net.ParseIP("100.65.80.39"), + ID: "peerB", + IP: net.ParseIP("100.65.80.39"), + Status: &nbpeer.PeerStatus{}, }, "peerC": { - ID: "peerC", - IP: net.ParseIP("100.65.254.139"), + ID: "peerC", + IP: net.ParseIP("100.65.254.139"), + Status: &nbpeer.PeerStatus{}, }, }, Groups: map[string]*Group{ diff --git a/management/server/route_test.go b/management/server/route_test.go index 94f169a9b..bbf0ea3dd 100644 --- a/management/server/route_test.go +++ b/management/server/route_test.go @@ -1062,6 +1062,7 @@ func initTestRouteAccount(t *testing.T, am *DefaultAccountManager) (*Account, er WtVersion: "development", UIVersion: "development", }, + Status: &nbpeer.PeerStatus{}, } account.Peers[peer1.ID] = peer1 @@ -1087,6 +1088,7 @@ func initTestRouteAccount(t *testing.T, am *DefaultAccountManager) (*Account, er WtVersion: "development", UIVersion: "development", }, + Status: &nbpeer.PeerStatus{}, } account.Peers[peer2.ID] = peer2 @@ -1112,6 +1114,7 @@ func initTestRouteAccount(t *testing.T, am *DefaultAccountManager) (*Account, er WtVersion: "development", UIVersion: "development", }, + Status: &nbpeer.PeerStatus{}, } account.Peers[peer3.ID] = peer3 @@ -1137,6 +1140,7 @@ func initTestRouteAccount(t *testing.T, am *DefaultAccountManager) (*Account, er WtVersion: "development", UIVersion: "development", }, + Status: &nbpeer.PeerStatus{}, } account.Peers[peer4.ID] = peer4 @@ -1162,6 +1166,7 @@ func initTestRouteAccount(t *testing.T, am *DefaultAccountManager) (*Account, er WtVersion: "development", UIVersion: "development", }, + Status: &nbpeer.PeerStatus{}, } account.Peers[peer5.ID] = peer5