mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[GH-ISSUE #159] [BUG] Range Reader returning wrong bytes #27
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ls-tommy-baloukas on GitHub (Jan 7, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/159
I am currently using the fakestorage package in my project to unit test my GCS code. It seems like calling NewRangeReader(ctx, offset, length) returns the wrong bytes depending on what I pass in as offset and length. For example, say I have a GCS Object that contains the following text: "Hello There!" and my goal is to read this file in chunks until the entire file is read, I would get get the following => "Hlotee" if I chunk the reads by 2 bytes starting from 0 to EOF.
I tested my code with a real GCS instance, and I get the correct data back after reading in chunks (2 byte size), so this seems to be related to the fakestorage package.
@fsouza commented on GitHub (Feb 6, 2020):
Hi @ls-tommy-baloukas, thanks for reporting and apologies for the delayed response. Let's fix this :)
Can you share a reproducer so we can use it as a test to prevent regressions?
@fsouza commented on GitHub (Feb 15, 2021):
Closing as stale.