@@ -232,6 +232,7 @@ func (s *S3StorageServerSuite) TestCheck(c *check.C) {
232232 svc .headErr = errors .New ("head error" )
233233 ok , chunked , sz , mod , err = server .Check (ctx , "dir" , "address" )
234234 c .Assert (err , check .ErrorMatches , "head error" )
235+ c .Assert (mod , check .Equals , time.Time {})
235236 c .Assert (chunked , check .IsNil )
236237 c .Assert (sz , check .DeepEquals , int64 (0 ))
237238 c .Assert (ok , check .Equals , false )
@@ -240,6 +241,7 @@ func (s *S3StorageServerSuite) TestCheck(c *check.C) {
240241 svc .headErr = & types.NoSuchKey {}
241242 ok , chunked , sz , mod , err = server .Check (ctx , "dir" , "address" )
242243 c .Assert (err , check .IsNil )
244+ c .Assert (mod , check .Equals , time.Time {})
243245 c .Assert (chunked , check .IsNil )
244246 c .Assert (sz , check .DeepEquals , int64 (0 ))
245247 c .Assert (ok , check .Equals , false )
@@ -254,6 +256,7 @@ func (s *S3StorageServerSuite) TestCheck(c *check.C) {
254256 }
255257 ok , chunked , sz , mod , err = server .Check (ctx , "dir" , "address" )
256258 c .Assert (err , check .ErrorMatches , "info.json head error" )
259+ c .Assert (mod , check .Equals , time.Time {})
257260 c .Assert (chunked , check .IsNil )
258261 c .Assert (sz , check .DeepEquals , int64 (0 ))
259262 c .Assert (ok , check .Equals , false )
@@ -272,6 +275,7 @@ func (s *S3StorageServerSuite) TestCheck(c *check.C) {
272275 }
273276 ok , chunked , sz , mod , err = server .Check (ctx , "dir" , "address" )
274277 c .Assert (err , check .ErrorMatches , "info.json get error" )
278+ c .Assert (mod , check .Equals , time.Time {})
275279 c .Assert (chunked , check .IsNil )
276280 c .Assert (sz , check .DeepEquals , int64 (0 ))
277281 c .Assert (ok , check .Equals , false )
@@ -287,12 +291,14 @@ func (s *S3StorageServerSuite) TestCheck(c *check.C) {
287291 }
288292 ok , chunked , sz , mod , err = server .Check (ctx , "dir" , "address" )
289293 c .Assert (err , check .ErrorMatches , "invalid character 'b' looking for beginning of value" )
294+ c .Assert (mod , check .Equals , time.Time {})
290295 c .Assert (chunked , check .IsNil )
291296 c .Assert (sz , check .DeepEquals , int64 (0 ))
292297 c .Assert (ok , check .Equals , false )
293298
294299 // Chunked - ok
295300 nowbytes , err := now .MarshalJSON ()
301+ c .Assert (err , check .IsNil )
296302 info := []byte (fmt .Sprintf (`{"chunk_size":64,"file_size":3232,"num_chunks":15,"complete":true,"mod_time":%s}` , string (nowbytes )))
297303 output = & testReadCloser {bytes .NewBuffer (info )}
298304 svc .getMap = map [string ]GetResponse {
@@ -304,6 +310,7 @@ func (s *S3StorageServerSuite) TestCheck(c *check.C) {
304310 }
305311 ok , chunked , sz , mod , err = server .Check (ctx , "dir" , "address" )
306312 c .Assert (err , check .IsNil )
313+ c .Assert (mod , check .Equals , time.Time {})
307314 c .Assert (chunked , check .NotNil )
308315 c .Assert (sz , check .DeepEquals , int64 (3232 ))
309316 c .Assert (ok , check .Equals , true )
@@ -339,6 +346,7 @@ func (s *S3StorageServerSuite) TestGet(c *check.C) {
339346 svc .getErr = errors .New ("get error" )
340347 rs , _ , sz , mod , ok , err = server .Get (ctx , "dir" , "address" )
341348 c .Assert (err , check .ErrorMatches , "get error" )
349+ c .Assert (mod , check .Equals , time.Time {})
342350 c .Assert (rs , check .IsNil )
343351 c .Assert (sz , check .DeepEquals , int64 (0 ))
344352 c .Assert (ok , check .Equals , false )
@@ -348,6 +356,7 @@ func (s *S3StorageServerSuite) TestGet(c *check.C) {
348356 svc .headErr = & types.NoSuchKey {}
349357 rs , _ , sz , mod , ok , err = server .Get (ctx , "dir" , "address" )
350358 c .Assert (err , check .IsNil )
359+ c .Assert (mod , check .Equals , time.Time {})
351360 c .Assert (rs , check .IsNil )
352361 c .Assert (sz , check .DeepEquals , int64 (0 ))
353362 c .Assert (ok , check .Equals , false )
@@ -362,6 +371,7 @@ func (s *S3StorageServerSuite) TestGet(c *check.C) {
362371 }
363372 rs , _ , sz , mod , ok , err = server .Get (ctx , "dir" , "address" )
364373 c .Assert (err , check .ErrorMatches , "info.json head error" )
374+ c .Assert (mod , check .Equals , time.Time {})
365375 c .Assert (rs , check .IsNil )
366376 c .Assert (sz , check .DeepEquals , int64 (0 ))
367377 c .Assert (ok , check .Equals , false )
@@ -385,6 +395,7 @@ func (s *S3StorageServerSuite) TestGet(c *check.C) {
385395 rs , _ , sz , mod , ok , err = server .Get (ctx , "dir" , "address" )
386396 c .Assert (err , check .ErrorMatches , "error reading chunked directory files for address: chunk read error" )
387397 c .Assert (rs , check .IsNil )
398+ c .Assert (mod , check .Equals , time.Time {})
388399 c .Assert (sz , check .Equals , int64 (0 ))
389400 c .Assert (ok , check .Equals , false )
390401
0 commit comments