Skip to content

Commit

Permalink
amen
Browse files Browse the repository at this point in the history
  • Loading branch information
ItamarYuran committed Dec 25, 2024
1 parent 1528c90 commit 08cc251
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions esti/s3_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/go-openapi/swag"

"github.com/minio/minio-go/v7"
Expand Down Expand Up @@ -205,17 +204,9 @@ func TestS3IfNoneMatch(t *testing.T) {

ctx, _, repo := setupTest(t)
defer tearDownTest(repo)
endpoint := "http://lakefs:8000"
client := createS3Client(endpoint, t)
bucketName := "test-bucket"
_, err := client.CreateBucket(ctx, &s3.CreateBucketInput{
Bucket: aws.String(bucketName),
CreateBucketConfiguration: &types.CreateBucketConfiguration{
LocationConstraint: types.BucketLocationConstraint("us-east-1"),
},
})

require.NoError(t, err, "Error creating bucket")
s3Endpoint := viper.GetString("s3_endpoint")
s3Client := createS3Client(s3Endpoint, t)

type TestCase struct {
Path string
Expand All @@ -241,8 +232,8 @@ func TestS3IfNoneMatch(t *testing.T) {
defer wg.Done()
for tc := range objects {
// Create the PutObject request
_, err := client.PutObject(ctx, &s3.PutObjectInput{
Bucket: aws.String(bucketName),
_, err := s3Client.PutObject(ctx, &s3.PutObjectInput{
Bucket: aws.String(repo),
Key: aws.String(tc.Path),
Body: strings.NewReader(tc.Content),
})
Expand Down

0 comments on commit 08cc251

Please sign in to comment.