Skip to content

Commit b231586

Browse files
committed
Fix linter warnings
1 parent 86e65a0 commit b231586

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pkg/rsstorage/internal/integration_test/chunks_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ func (s *ChunksPartialReadSuite) TestReadPartialTimeout(c *check.C) {
393393
for {
394394
_, err := io.CopyN(pW, b, int64(cw.ChunkSize))
395395
if err == io.EOF {
396-
err = nil
397396
return
398397
}
399398
c.Assert(err, check.IsNil)

pkg/rsstorage/internal/integration_test/integration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func getStorageServerAttempt(
4646
if cfg.File == nil {
4747
return nil, fmt.Errorf("Missing [FileStorage \"%s\"] configuration section", class)
4848
}
49-
//todo bioc: configurable size here
49+
// todo bioc: configurable size here
5050
server = file.NewStorageServer(
5151
file.StorageServerArgs{
5252
Dir: cfg.File.Location,

pkg/rsstorage/internal/integration_test/integration_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,14 +538,16 @@ func (s *S3IntegrationSuite) SetUpSuite(c *check.C) {
538538
}
539539

540540
var minioEndpoint = "http://minio:9000"
541-
var awsEndpoint = ""
541+
542+
// Use this variable for customizing the AWS endpoint for debugging
543+
// var awsEndpoint = ""
542544

543545
func (s *S3IntegrationSuite) TestPopulateServerSetHang(c *check.C) {
544546
ctx := context.Background()
545547
defer leaktest.Check(c)
546548

547549
// Customize these as needed for your environment
548-
//endpoint := awsEndpoint // AWS
550+
// endpoint := awsEndpoint // AWS
549551
endpoint := minioEndpoint // MinIO
550552
bucket := "rsstorage-minio-test"
551553
region := "us-east-1"
@@ -613,7 +615,7 @@ func (s *S3IntegrationSuite) TestPopulateServerSetHang(c *check.C) {
613615
resolver := func(class string) types.Resolver {
614616
return func(w io.Writer) (string, string, error) {
615617
// Start writing some data to the resolver's writer
616-
//w.Write([]byte(fmt.Sprintf(testAssetData, class)))
618+
// w.Write([]byte(fmt.Sprintf(testAssetData, class)))
617619
gzw := gzip.NewWriter(w)
618620

619621
slog.Info("resolver: wrote some data, instructing test to continue, but waiting for instruction to err")

pkg/rsstorage/servers/s3server/server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
const AmzUnencryptedContentLengthHeader = "X-Amz-Unencrypted-Content-Length"
2727

2828
type moveOrCopyFn func(ctx context.Context, oldBucket, oldKey, newBucket, newKey string) (*s3.CopyObjectOutput, error)
29-
type copyFn func(ctx context.Context, input *s3.CopyObjectInput) (*s3.CopyObjectOutput, error)
3029

3130
type StorageServer struct {
3231
bucket string
@@ -423,7 +422,7 @@ func (s *StorageServer) parts(ctx context.Context, dir, address string) ([]rssto
423422
}
424423
chunkDir := filepath.Join(dir, address)
425424
parts = append(parts, rsstorage.NewCopyPart(chunkDir, "info.json"))
426-
for i := 1; i <= int(chunked.NumChunks); i++ {
425+
for i := uint64(1); i <= chunked.NumChunks; i++ {
427426
chunkName := fmt.Sprintf("%08d", i)
428427
parts = append(parts, rsstorage.NewCopyPart(chunkDir, chunkName))
429428
}

0 commit comments

Comments
 (0)