Skip to content

Commit bf7846f

Browse files
committed
fix typo
1 parent 65b14f5 commit bf7846f

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

support/datastore/helpers_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package datastore
22

33
import (
44
"bytes"
5-
"github.com/stretchr/testify/require"
65
"io"
76
"testing"
7+
8+
"github.com/stretchr/testify/require"
89
)
910

1011
// requireReaderContentEquals is a helper function to assert reader content.

support/datastore/s3_datastore.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import (
55
"context"
66
"errors"
77
"fmt"
8+
"io"
9+
"os"
10+
"path"
11+
"strings"
12+
813
"github.com/aws/aws-sdk-go-v2/aws"
914
"github.com/aws/aws-sdk-go-v2/config"
1015
"github.com/aws/aws-sdk-go-v2/feature/s3/manager"
@@ -13,10 +18,6 @@ import (
1318
"github.com/aws/smithy-go"
1419
"github.com/stellar/go/support/log"
1520
"github.com/stellar/go/support/url"
16-
"io"
17-
"os"
18-
"path"
19-
"strings"
2021
)
2122

2223
// S3DataStore implements DataStore for AWS S3 and S3-compatible services.
@@ -53,7 +54,6 @@ func NewS3DataStore(ctx context.Context, datastoreConfig DataStoreConfig) (DataS
5354
})
5455

5556
return FromS3Client(ctx, client, destinationBucketPath, datastoreConfig.Schema)
56-
5757
}
5858

5959
func FromS3Client(ctx context.Context, client *s3.Client, bucketPath string, schema DataStoreSchema) (DataStore, error) {
@@ -101,7 +101,7 @@ func (b S3DataStore) GetFile(ctx context.Context, filePath string) (io.ReadClose
101101
input := &s3.GetObjectInput{
102102
Bucket: aws.String(b.bucket),
103103
Key: aws.String(filePath),
104-
ChecksumMode: types.ChecksumModeEnabled,
104+
ChecksumMode: types.ChecksumModeEnabled, // Enable checksum validation
105105
}
106106

107107
output, err := b.client.GetObject(ctx, input)

support/datastore/s3_datastore_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ import (
44
"bytes"
55
"context"
66
"fmt"
7-
"github.com/aws/aws-sdk-go-v2/aws"
8-
"github.com/aws/aws-sdk-go-v2/config"
9-
"github.com/aws/aws-sdk-go-v2/credentials"
10-
"github.com/aws/aws-sdk-go-v2/service/s3"
11-
"github.com/stretchr/testify/require"
127
"io"
138
"net/http"
149
"net/http/httptest"
1510
"os"
1611
"strings"
1712
"sync"
1813
"testing"
14+
15+
"github.com/aws/aws-sdk-go-v2/aws"
16+
"github.com/aws/aws-sdk-go-v2/config"
17+
"github.com/aws/aws-sdk-go-v2/credentials"
18+
"github.com/aws/aws-sdk-go-v2/service/s3"
19+
"github.com/stretchr/testify/require"
1920
)
2021

2122
// mockS3Object stores object data and metadata within the mock server.

0 commit comments

Comments
 (0)