diff --git a/s3/README.md b/s3/README.md index 5dd02bfe..f2bb9259 100644 --- a/s3/README.md +++ b/s3/README.md @@ -74,7 +74,7 @@ err := store.Set("my-key", []byte("my-value")) Or, call `SetWithChecksum()` to create an object with checksum to ask S3 server to verify data integrity on server side: -> Currently 4 algorithm are supported: +> Currently 4 algorithms are supported: > - types.ChecksumAlgorithmCrc32 (`CRC32`) > - types.ChecksumAlgorithmCrc32c (`CRC32C`) > - types.ChecksumAlgorithmSha1 (`SHA1`) diff --git a/s3/init_test.go b/s3/init_test.go index 99ce5c31..e25002de 100644 --- a/s3/init_test.go +++ b/s3/init_test.go @@ -1,5 +1,9 @@ package s3 +import ( + "time" +) + var testStore *Storage func init() { @@ -12,7 +16,7 @@ func init() { AccessKey: "minioadmin", SecretAccessKey: "minioadmin", }, + RequestTimeout: 10 * time.Second, }, ) - } diff --git a/s3/s3_methods.go b/s3/s3_methods.go index 746e701c..1f540a0d 100644 --- a/s3/s3_methods.go +++ b/s3/s3_methods.go @@ -12,8 +12,8 @@ import ( // Additional methods for S3, but not required by gofiber Storage interface. // SetWithChecksum sets key with value and checksum. -// Key of `checksum` map is algorithm in upper cases, value is the checksum. -// Currently only 4 algorithm are supported: +// +// Currently 4 algorithms are supported: // - types.ChecksumAlgorithmCrc32 (`CRC32`) // - types.ChecksumAlgorithmCrc32c (`CRC32C`) // - types.ChecksumAlgorithmSha1 (`SHA1`) diff --git a/s3/s3_methods_test.go b/s3/s3_methods_test.go index a43aa04b..6cacffce 100644 --- a/s3/s3_methods_test.go +++ b/s3/s3_methods_test.go @@ -10,7 +10,7 @@ import ( func Test_S3_SetWithChecksum(t *testing.T) { var ( - key = "john" + key = "set-with-checksum" val = []byte("doe") sha256sum = sha256.New().Sum(val) checksum = map[types.ChecksumAlgorithm][]byte{