mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-12 16:39:09 +02:00
fixed a flaky test
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
@@ -114,7 +114,11 @@ func TestDecodeEnvelope_MalformedWgKeyPeerSkipped(t *testing.T) {
|
|||||||
require.Len(t, full.Peers, 2, "smoke fixture should have two peers")
|
require.Len(t, full.Peers, 2, "smoke fixture should have two peers")
|
||||||
|
|
||||||
// Truncate the second peer's wg_pub_key so it fails the length gate.
|
// Truncate the second peer's wg_pub_key so it fails the length gate.
|
||||||
full.Peers[1].WgPubKey = full.Peers[1].WgPubKey[:31]
|
for _, p := range full.Peers {
|
||||||
|
if base64.StdEncoding.EncodeToString(p.WgPubKey) != localPeerKey {
|
||||||
|
p.WgPubKey = p.WgPubKey[:31]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wire, err := goproto.Marshal(envelope)
|
wire, err := goproto.Marshal(envelope)
|
||||||
require.NoError(t, err, "marshal envelope")
|
require.NoError(t, err, "marshal envelope")
|
||||||
|
|||||||
Reference in New Issue
Block a user