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.
  • Loading branch information
carpawell committed Sep 25, 2023
1 parent 2f21d71 commit cbe3b1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/neofs-rest-gw/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func runLocalTests(ctx context.Context, t *testing.T, key *keys.PrivateKey) {

func runTestInContainer(rootCtx context.Context, t *testing.T, key *keys.PrivateKey) {
versions := []dockerImage{
{image: "nspccdev/neofs-aio", version: "0.36.0"},
{image: "nspccdev/neofs-aio", version: "0.38.1"},
{image: "nspccdev/neofs-aio", version: "latest"},
}

Expand Down 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 cbe3b1f

Please sign in to comment.