From 52d64720337e9ef06024aa6f7f6cba43592e9a61 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Mon, 25 Sep 2023 16:30:20 +0300 Subject: [PATCH] tests: Apply network setting to the slicer Homomorphic hashing can be turned on/off, pass this parameter directly to the slicer to prevent any unexpected results in the future. Signed-off-by: Pavel Karpy --- cmd/neofs-rest-gw/integration_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/neofs-rest-gw/integration_test.go b/cmd/neofs-rest-gw/integration_test.go index d324191..638ed35 100644 --- a/cmd/neofs-rest-gw/integration_test.go +++ b/cmd/neofs-rest-gw/integration_test.go @@ -1322,7 +1322,14 @@ func createObject(ctx context.Context, t *testing.T, p *pool.Pool, ownerID *user obj.SetAttributes(attributes...) obj.SetPayload(payload) + info, err := p.NetworkInfo(ctx, client.PrmNetworkInfo{}) + require.NoError(t, err) + var opts slicer.Options + if !info.HomomorphicHashingDisabled() { + opts.CalculateHomomorphicChecksum() + } + objID, err := slicer.Put(ctx, p, obj, signer, bytes.NewReader(payload), opts) require.NoError(t, err)