Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
3pointer committed Mar 3, 2023
1 parent 34a99ee commit 44378c1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions br/pkg/storage/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1220,9 +1220,9 @@ func TestObjectLock(t *testing.T) {

func TestS3StorageBucketRegion(t *testing.T) {
type testcase struct {
name string
region string
s3 *backuppb.S3
name string
expectRegion string
s3 *backuppb.S3
}

require.NoError(t, os.Setenv("AWS_ACCESS_KEY_ID", "ab"))
Expand Down Expand Up @@ -1275,6 +1275,8 @@ func TestS3StorageBucketRegion(t *testing.T) {
func(name string, region string, s3 *backuppb.S3) {
s := createGetBucketRegionServer(region, 200, true)
defer s.Close()
s3.ForcePathStyle = true
s3.Endpoint = s.URL

t.Log(name)
es, err := New(context.Background(),
Expand All @@ -1285,6 +1287,6 @@ func TestS3StorageBucketRegion(t *testing.T) {
require.True(t, ok)
require.Equal(t, region, ss.GetOptions().Region)

}(ca.name, ca.region, ca.s3)
}(ca.name, ca.expectRegion, ca.s3)
}
}

0 comments on commit 44378c1

Please sign in to comment.