From fb345bf63fe69f6c5c4adb799101567ddfce7c29 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Sat, 28 Dec 2024 19:24:25 +0300 Subject: [PATCH] node/object/replicate_test: fix replication signature test An omission from ae6e37d72e1d6b32352e79a5383d30da21edc4d2: check all 3 signatures and slice them correctly. Signed-off-by: Pavel Karpy --- pkg/network/transport/object/grpc/replication_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/network/transport/object/grpc/replication_test.go b/pkg/network/transport/object/grpc/replication_test.go index 39baa0d687..74ed588145 100644 --- a/pkg/network/transport/object/grpc/replication_test.go +++ b/pkg/network/transport/object/grpc/replication_test.go @@ -398,7 +398,7 @@ func TestServer_Replicate(t *testing.T) { sigsRaw := resp.GetObjectSignature() - for i := range 1 { + for i := range 3 { var sigV2 refsv2.Signature l := binary.LittleEndian.Uint32(sigsRaw) @@ -410,9 +410,9 @@ func TestServer_Replicate(t *testing.T) { require.Equal(t, signer.PublicKeyBytes, sig.PublicKeyBytes()) require.True(t, sig.Verify(objectcore.EncodeReplicationMetaInfo( o.GetContainerID(), o.GetID(), o.GetFirstID(), o.GetPreviousID(), o.PayloadSize(), o.Type(), nil, nil, - uint64((123+1+i)*240), mNumber))) + uint64((123+1+i)*240), mNumber)), i) - sigsRaw = sigsRaw[:4+l] + sigsRaw = sigsRaw[4+l:] } }) })