diff --git a/internal/s3local/client.go b/internal/s3local/client.go index a917d6d..e228526 100644 --- a/internal/s3local/client.go +++ b/internal/s3local/client.go @@ -5,7 +5,6 @@ import ( "git.frostfs.info/TrueCloudLab/frostfs-s3-gw/api/data" "git.frostfs.info/TrueCloudLab/frostfs-s3-gw/api/layer" - v2container "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/container" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user" "git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/datagen" "git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/local" @@ -18,7 +17,7 @@ type Client struct { vu modules.VU l *layer.Layer ownerID *user.ID - resolver layer.BucketResolver + resolver fixedBucketResolver limiter local.Limiter } @@ -43,7 +42,7 @@ func (c *Client) Put(bucket, key string, payload datagen.Payload) PutResponse { Error: "engine size limit reached", } } - cid, err := c.resolver.Resolve(c.vu.Context(), v2container.SysAttributeZoneDefault, bucket) + cid, err := c.resolver.Resolve(c.vu.Context(), "", bucket) if err != nil { stats.Report(c.vu, objPutFails, 1) return PutResponse{Error: err.Error()} @@ -79,7 +78,7 @@ func (c *Client) Put(bucket, key string, payload datagen.Payload) PutResponse { } func (c *Client) Get(bucket, key string) GetResponse { - cid, err := c.resolver.Resolve(c.vu.Context(), v2container.SysAttributeZoneDefault, bucket) + cid, err := c.resolver.Resolve(c.vu.Context(), "", bucket) if err != nil { stats.Report(c.vu, objGetFails, 1) return GetResponse{Error: err.Error()} diff --git a/internal/s3local/resolver.go b/internal/s3local/resolver.go index 3512e6b..e9ee92c 100644 --- a/internal/s3local/resolver.go +++ b/internal/s3local/resolver.go @@ -24,9 +24,9 @@ func newFixedBucketResolver(bucketMapping map[string]string) (fixedBucketResolve return r, nil } -func (r fixedBucketResolver) Resolve(_ context.Context, zone, bucket string) (cid.ID, error) { - if cnrID, resolved := r[zone+"/"+bucket]; resolved { +func (r fixedBucketResolver) Resolve(_ context.Context, _, bucket string) (cid.ID, error) { + if cnrID, resolved := r[bucket]; resolved { return cnrID, nil } - return cid.ID{}, fmt.Errorf("zone %s and bucket %s is not mapped to any container", zone, bucket) + return cid.ID{}, fmt.Errorf("bucket %s is not mapped to any container", bucket) }