mirror of
https://github.com/versity/versitygw.git
synced 2026-01-08 12:41:10 +00:00
Merge pull request #1293 from versity/sis/getobject_with_range-context-cancelation
fix: fixes the early context cancelation issue in GetObject_with_range integration test.
This commit is contained in:
@@ -4320,12 +4320,12 @@ func GetObject_with_range(s *S3Conf) error {
|
||||
|
||||
testGetObjectRange := func(rng, contentRange string, cLength int64, expData []byte, expErr error) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
|
||||
defer cancel()
|
||||
out, err := s3client.GetObject(ctx, &s3.GetObjectInput{
|
||||
Bucket: &bucket,
|
||||
Key: &obj,
|
||||
Range: &rng,
|
||||
})
|
||||
cancel()
|
||||
if err == nil && expErr != nil {
|
||||
return fmt.Errorf("expected err %w, instead got nil", expErr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user