Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fGetobject-resume test is not testing resume #764

Merged
merged 4 commits into from
Apr 23, 2019

Conversation

diddiman-zz
Copy link
Contributor

@diddiman-zz diddiman-zz commented Apr 16, 2019

As it was before the following happened

  1. call putObject with the 5mb file. In reality a multipart upload is performed with the file as the only part
  2. Create a part file using the object name and the md5 hash and put in 100kb of random data
  3. Call fGetObject. fGetObject will look for a part file containing the object name and the etag, since a multipart upload was performed, the etag will not match the md5 for aws (prob minio as well).
  4. Test passes as the md5 hash matches for the the uploaded and the downloaded file

With the PR we instead call statobject and use the etag we get to create the part file. Also the part file will contain the first 100kb from the 5mb file, instead of 100kb of random data. The fGetObject will then use the part file, and skip those bytes in the part file, resulting in an actual resume as the test implies. The resulting md5 hash will match with the one we uploaded so the test will pass.

ebozduman
ebozduman previously approved these changes Apr 18, 2019
Copy link
Contributor

@ebozduman ebozduman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the PR.

Copy link
Contributor

@ebozduman ebozduman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kannappanr kannappanr merged commit 095fb32 into minio:master Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants