Skip to content

Commit

Permalink
tests: Apply network setting to the slicer
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
carpawell committed Sep 25, 2023
1 parent 2f21d71 commit 52d6472
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/neofs-rest-gw/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 52d6472

Please sign in to comment.