aboutsummaryrefslogtreecommitdiff
path: root/tests/object_iterator_test.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2018-04-30 14:14:56 +0200
committerStefan Majewsky <majewsky@gmx.net>2018-05-02 19:33:46 +0200
commitf9749638e3393f471d7e28362795689bf37cc023 (patch)
tree57d56e88387b6ceef39ba23e29d009d683e44be4 /tests/object_iterator_test.go
parenta5ad3ae67e9c42aa738adae7e7fd535109bc9005 (diff)
downloadgo-schwift-f9749638e3393f471d7e28362795689bf37cc023.tar.gz
revamp the LargeObject API
I thought about this some more, and I believe the Writer-based approach in the previous version of the LargeObject API does not scale: It makes it very hard to write code that uploads segments without resorting to a buffer the same size as the segments. I don't want gigabyte-scale buffers filling up my RAM, so this commit switches to a different API based on Readers. LargeObject.Append() now behaves very similar to Object.Upload(), which I find quite nice.
Diffstat (limited to 'tests/object_iterator_test.go')
-rw-r--r--tests/object_iterator_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/object_iterator_test.go b/tests/object_iterator_test.go
index 009189d..9b822cd 100644
--- a/tests/object_iterator_test.go
+++ b/tests/object_iterator_test.go
@@ -39,7 +39,7 @@ func TestObjectIterator(t *testing.T) {
for idx := 1; idx <= 4; idx++ {
hdr := schwift.NewObjectHeaders()
hdr.ContentType().Set("application/json")
- err := c.Object(oname(idx)).Upload(bytes.NewReader(objectExampleContent), hdr.ToOpts())
+ err := c.Object(oname(idx)).Upload(bytes.NewReader(objectExampleContent), nil, hdr.ToOpts())
expectSuccess(t, err)
}