From 029af2a865008d2747fe5cbd41f238f3b3fd6a03 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 24 Jan 2024 18:51:13 +0300 Subject: [PATCH] [#114] local: Fix payload type after recent refactoring Signed-off-by: Evgenii Stratonikov --- internal/local/client.go | 4 ++-- internal/native/client.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/local/client.go b/internal/local/client.go index 6116bca..b619e3c 100644 --- a/internal/local/client.go +++ b/internal/local/client.go @@ -5,8 +5,8 @@ import ( cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id" oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id" + "git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/datagen" "git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/local/rawclient" - "github.com/dop251/goja" "go.k6.io/k6/js/modules" ) @@ -33,7 +33,7 @@ type ( DeleteResponse SuccessOrErrorResponse ) -func (c *Client) Put(containerID string, headers map[string]string, payload goja.ArrayBuffer) PutResponse { +func (c *Client) Put(containerID string, headers map[string]string, payload datagen.Payload) PutResponse { if c.l.IsFull() { return PutResponse{ Success: false, diff --git a/internal/native/client.go b/internal/native/client.go index e6bc330..9a027a3 100644 --- a/internal/native/client.go +++ b/internal/native/client.go @@ -24,7 +24,6 @@ import ( "git.frostfs.info/TrueCloudLab/tzhash/tz" "git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/datagen" "git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/stats" - "github.com/dop251/goja" "go.k6.io/k6/js/modules" "go.k6.io/k6/metrics" ) @@ -327,7 +326,7 @@ func (c *Client) PutContainer(params map[string]string) PutContainerResponse { return PutContainerResponse{Success: true, ContainerID: res.ID().EncodeToString()} } -func (c *Client) Onsite(containerID string, payload goja.ArrayBuffer) PreparedObject { +func (c *Client) Onsite(containerID string, payload datagen.Payload) PreparedObject { maxObjectSize, epoch, hhDisabled, err := parseNetworkInfo(c.vu.Context(), c.cli) if err != nil { panic(err)