mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-20 09:16:40 +00:00
fix key check
This commit is contained in:
@@ -255,12 +255,12 @@ func Test_SyncProtocol(t *testing.T) {
|
|||||||
|
|
||||||
// expired peers come separately.
|
// expired peers come separately.
|
||||||
if len(networkMap.GetOfflinePeers()) != 2 {
|
if len(networkMap.GetOfflinePeers()) != 2 {
|
||||||
t.Fatal("expecting SyncResponse to have NetworkMap with 1 offline peer")
|
t.Fatal("expecting SyncResponse to have NetworkMap with 2 offline peer")
|
||||||
}
|
}
|
||||||
|
|
||||||
expiredPeerPubKey := "RlSy2vzoG2HyMBTUImXOiVhCBiiBa5qD5xzMxkiFDW4="
|
expiredPeerPubKey := "RlSy2vzoG2HyMBTUImXOiVhCBiiBa5qD5xzMxkiFDW4="
|
||||||
if networkMap.GetOfflinePeers()[0].WgPubKey != expiredPeerPubKey {
|
if !(networkMap.GetOfflinePeers()[0].WgPubKey == expiredPeerPubKey || networkMap.GetOfflinePeers()[1].WgPubKey == expiredPeerPubKey) {
|
||||||
t.Fatalf("expecting SyncResponse to have NetworkMap with 1 offline peer with a key %s", expiredPeerPubKey)
|
t.Fatalf("expecting SyncResponse to have NetworkMap with 2 offline peer with a key %s", expiredPeerPubKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
if networkMap.GetPeerConfig() == nil {
|
if networkMap.GetPeerConfig() == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user