From c6d16724fbccb1f7fe8a92ffc9af6c7b30182048 Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Fri, 17 Jan 2025 02:24:40 +0100 Subject: [PATCH] fix key check --- management/server/management_proto_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/management/server/management_proto_test.go b/management/server/management_proto_test.go index 8b51507bc..dde353b95 100644 --- a/management/server/management_proto_test.go +++ b/management/server/management_proto_test.go @@ -255,12 +255,12 @@ func Test_SyncProtocol(t *testing.T) { // expired peers come separately. 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=" - if networkMap.GetOfflinePeers()[0].WgPubKey != expiredPeerPubKey { - t.Fatalf("expecting SyncResponse to have NetworkMap with 1 offline peer with a key %s", expiredPeerPubKey) + if !(networkMap.GetOfflinePeers()[0].WgPubKey == expiredPeerPubKey || networkMap.GetOfflinePeers()[1].WgPubKey == expiredPeerPubKey) { + t.Fatalf("expecting SyncResponse to have NetworkMap with 2 offline peer with a key %s", expiredPeerPubKey) } if networkMap.GetPeerConfig() == nil {