Skip to content

Commit

Permalink
test: Run range requests against live servers
Browse files Browse the repository at this point in the history
  • Loading branch information
lauriro committed Sep 22, 2024
1 parent cc8f2df commit 382c309
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/live.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ describe("S3 live on {0} {1}", [
})
})

it("should get part of file from bucket", function(assert) {
assert.setTimeout(5000)
assert.plan(4)
s3client.get(fileName, { Range: "bytes=0-4" }, function(err, data) {
assert.notOk(err)
assert.equal(data, content.slice(0, 5))
})
s3client.get(fileName, { Range: "bytes=-5" }, function(err, data) {
assert.notOk(err)
assert.equal(data, content.slice(-5))
})
})

it("should list files", function(assert) {
assert.setTimeout(5000)
s3client.list("", null, function(err, data) {
Expand Down

0 comments on commit 382c309

Please sign in to comment.