From 1a84987c7e28094f4e65bfb0fa03fdf5059ef6cc Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Mon, 19 Feb 2018 14:40:33 +0100 Subject: initialize .Headers on accounts/containers during GET requests --- object_iterator_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'object_iterator_test.go') diff --git a/object_iterator_test.go b/object_iterator_test.go index 86a96e9..64cb6a2 100644 --- a/object_iterator_test.go +++ b/object_iterator_test.go @@ -94,6 +94,7 @@ func TestObjectIterator(t *testing.T) { expectObjectInfos(t, ois) //test Foreach + c.Invalidate() iter = c.Objects() iter.Prefix = "schwift-test-listing" idx := 0 @@ -104,7 +105,12 @@ func TestObjectIterator(t *testing.T) { })) expectInt(t, idx, 4) + if c.headers == nil { + t.Error("ObjectIterator.Foreach did not initialize Container.Headers") + } + //test ForeachDetailed + c.Invalidate() iter = c.Objects() iter.Prefix = "schwift-test-listing" idx = 0 @@ -115,6 +121,10 @@ func TestObjectIterator(t *testing.T) { })) expectInt(t, idx, 4) + if c.headers == nil { + t.Error("ObjectIterator.ForeachDetailed did not initialize Container.Headers") + } + //test Collect iter = c.Objects() iter.Prefix = "schwift-test-listing" -- cgit v1.2.3