2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/ *  
						 
					
						
							
								
									
										
										
										
											2017-01-19 04:24:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  Minio  Cloud  Storage ,  ( C )  2015 - 2016 ,  2017  Minio ,  Inc . 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Licensed  under  the  Apache  License ,  Version  2.0  ( the  "License" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  you  may  not  use  this  file  except  in  compliance  with  the  License . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  You  may  obtain  a  copy  of  the  License  at 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *      http : //www.apache.org/licenses/LICENSE-2.0
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Unless  required  by  applicable  law  or  agreed  to  in  writing ,  software 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  distributed  under  the  License  is  distributed  on  an  "AS IS"  BASIS , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  WITHOUT  WARRANTIES  OR  CONDITIONS  OF  ANY  KIND ,  either  express  or  implied . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  See  the  License  for  the  specific  language  governing  permissions  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  limitations  under  the  License . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-08-19 07:23:42 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								package  cmd  
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								import  (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"bytes" 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-16 04:27:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									"context" 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-22 13:30:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									"crypto/md5" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"encoding/hex" 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"fmt" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"io/ioutil" 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-13 10:25:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									"os" 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"strconv" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"strings" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"testing" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 03:32:44 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								// Wrapper for calling ListObjects tests for both XL multiple disks and single node setup.
  
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								func  TestListObjects ( t  * testing . T )  {  
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									ExecObjectLayerTest ( t ,  testListObjects ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								// Unit test for ListObjects in general.
  
						 
					
						
							
								
									
										
										
										
											2016-07-08 06:05:51 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								func  testListObjects ( obj  ObjectLayer ,  instanceType  string ,  t  TestErrHandler )  {  
						 
					
						
							
								
									
										
										
										
											2016-04-09 01:37:38 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									testBuckets  :=  [ ] string { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// This bucket is used for testing ListObject operations.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"test-bucket-list-object" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Will not store any objects in this bucket,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Its to test ListObjects on an empty bucket.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"empty-bucket" , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									for  _ ,  bucket  :=  range  testBuckets  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-16 04:27:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										err  :=  obj . MakeBucketWithLocation ( context . Background ( ) ,  bucket ,  "" ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											t . Fatalf ( "%s : %s" ,  instanceType ,  err . Error ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									var  err  error 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									testObjects  :=  [ ] struct  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										name     string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										content  string 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-14 03:48:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										meta     map [ string ] string 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-14 03:48:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ "Asia-maps.png" ,  "asis-maps" ,  map [ string ] string { "content-type" :  "image/png" } } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "Asia/India/India-summer-photos-1" ,  "contentstring" ,  nil } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "Asia/India/Karnataka/Bangalore/Koramangala/pics" ,  "contentstring" ,  nil } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "newPrefix0" ,  "newPrefix0" ,  nil } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "newPrefix1" ,  "newPrefix1" ,  nil } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "newzen/zen/recurse/again/again/again/pics" ,  "recurse" ,  nil } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "obj0" ,  "obj0" ,  nil } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "obj1" ,  "obj1" ,  nil } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "obj2" ,  "obj2" ,  nil } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ "z-empty-dir/" ,  "" ,  nil } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  _ ,  object  :=  range  testObjects  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-22 13:30:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										md5Bytes  :=  md5 . Sum ( [ ] byte ( object . content ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2018-11-15 09:36:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										_ ,  err  =  obj . PutObject ( context . Background ( ) ,  testBuckets [ 0 ] ,  object . name ,  mustGetPutObjReader ( t ,  bytes . NewBufferString ( object . content ) , 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-09 13:31:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											int64 ( len ( object . content ) ) ,  hex . EncodeToString ( md5Bytes [ : ] ) ,  "" ) ,  ObjectOptions { UserDefined :  object . meta } ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											t . Fatalf ( "%s : %s" ,  instanceType ,  err . Error ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// Formualting the result data set to be expected from ListObjects call inside the tests,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// This will be used in testCases and used for asserting the correctness of ListObjects output in the tests.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									resultCases  :=  [ ] ListObjectsInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-0.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Testing for listing all objects in the bucket, (testCase 20,21,22).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-1.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for asserting the truncated case, (testCase 23).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-2.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// (TestCase 24).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-3.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// (TestCase 25).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-4.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Again used for truncated case.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// (TestCase 26).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-5.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for Asserting prefixes.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for test case with prefix "new", (testCase 27-29).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-6.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for Asserting prefixes.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for test case with prefix = "obj", (testCase 30).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-7.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for Asserting prefixes and truncation.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for test case with prefix = "new" and maxKeys = 1, (testCase 31).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-8.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for Asserting prefixes.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for test case with prefix = "obj" and maxKeys = 2, (testCase 32).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-9.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for asserting the case with marker, but without prefix.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										//marker is set to "newPrefix0" in the testCase, (testCase 33).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-10.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										//marker is set to "newPrefix1" in the testCase, (testCase 34).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-11.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										//marker is set to "obj0" in the testCase, (testCase 35).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-12.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker is set to "obj1" in the testCase, (testCase 36).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-13.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker is set to "man" in the testCase, (testCase37).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-14.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker is set to "Abc" in the testCase, (testCase 39).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-15.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker is set to "Asia/India/India-summer-photos-1" in the testCase, (testCase 40).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-16.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker is set to "Asia/India/Karnataka/Bangalore/Koramangala/pics" in the testCase, (testCase 41).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "z-empty-dir/" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-17.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Used for asserting the case with marker, without prefix but with truncation.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker =  "newPrefix0" & maxKeys = 3 in the testCase, (testCase42).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Output truncated to 3 values.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-18.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker = "newPrefix1" & maxkeys = 1 in the testCase, (testCase43).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Output truncated to 1 value.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-19.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker = "obj0" & maxKeys = 1 in the testCase, (testCase44).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Output truncated to 1 value.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-20.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker = "obj0" & prefix = "obj" in the testCase, (testCase 45).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-21.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker = "obj1" & prefix = "obj" in the testCase, (testCase 46).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-22.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker = "newPrefix0" & prefix = "new" in the testCase,, (testCase 47).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newzen/zen/recurse/again/again/again/pics" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-23.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Prefix is set to "Asia/India/" in the testCase, and delimiter is not set (testCase 55).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-24.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Prefix is set to "Asia" in the testCase, and delimiter is not set (testCase 56).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/Karnataka/Bangalore/Koramangala/pics" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-25.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Prefix is set to "Asia" in the testCase, and delimiter is set (testCase 57).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-05 00:14:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												{ Name :  "Asia-maps.png" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-26.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// prefix = "new" and delimiter is set in the testCase.(testCase 58).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-27.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Prefix is set to "Asia/India/" in the testCase, and delimiter is set to forward slash '/' (testCase 59).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "Asia/India/India-summer-photos-1" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-28.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker is set to "Asia/India/India-summer-photos-1" and delimiter set in the testCase, (testCase 60).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-29.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Marker is set to "Asia/India/Karnataka/Bangalore/Koramangala/pics" in the testCase and delimeter set, (testCase 61).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :  [ ] ObjectInfo { 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-22 18:18:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "newPrefix1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj0" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj1" } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												{ Name :  "obj2" } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-28 06:43:51 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// ListObjectsResult-30.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Prefix and Delimiter is set to '/', (testCase 62).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											IsTruncated :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Objects :      [ ] ObjectInfo { } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									testCases  :=  [ ] struct  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Inputs to ListObjects.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										bucketName  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										prefix      string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										marker      string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										delimeter   string 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-05 17:36:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										maxKeys     int32 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Expected output of ListObjects.
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										result  ListObjectsInfo 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										err     error 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Flag indicating whether the test is expected to pass or not.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										shouldPass  bool 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Test cases with invalid bucket names ( Test number 1-4 ).
 
							 
						 
					
						
							
								
									
										
										
										
											2018-04-24 11:27:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ ".test" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  ".test" } ,  false } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "Test" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  "Test" } ,  false } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "---" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  "---" } ,  false } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "ad" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  "ad" } ,  false } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Using an existing file for bucket name, but its not a directory (5).
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "simple-file.txt" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  "simple-file.txt" } ,  false } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Valid bucket names, but they donot exist (6-8).
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "volatile-bucket-1" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  "volatile-bucket-1" } ,  false } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "volatile-bucket-2" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  "volatile-bucket-2" } ,  false } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "volatile-bucket-3" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  BucketNotFound { Bucket :  "volatile-bucket-3" } ,  false } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Valid, existing bucket, but sending invalid delimeter values (9-10).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Empty string < "" > and forward slash < / > are the ony two valid arguments for delimeter.
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "*" ,  0 ,  ListObjectsInfo { } ,  fmt . Errorf ( "delimiter '%s' is not supported" ,  "*" ) ,  false } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "-" ,  0 ,  ListObjectsInfo { } ,  fmt . Errorf ( "delimiter '%s' is not supported" ,  "-" ) ,  false } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing for failure cases with both perfix and marker (11).
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-14 16:46:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										// The prefix and marker combination to be valid it should satisfy strings.HasPrefix(marker, prefix).
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "asia" ,  "europe-object" ,  "" ,  0 ,  ListObjectsInfo { } ,  fmt . Errorf ( "Invalid combination of marker '%s' and prefix '%s'" ,  "europe-object" ,  "asia" ) ,  false } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Setting a non-existing directory to be prefix (12-13).
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "empty-bucket" ,  "europe/france/" ,  "" ,  "" ,  1 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-17 04:06:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ "empty-bucket" ,  "africa/tunisia/" ,  "" ,  "" ,  1 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing on empty bucket, that is, bucket without any objects in it (14).
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "empty-bucket" ,  "" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Setting maxKeys to negative value (15-16).
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "empty-bucket" ,  "" ,  "" ,  "" ,  - 1 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "empty-bucket" ,  "" ,  "" ,  "" ,  1 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Setting maxKeys to a very large value (17).
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-05 17:36:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ "empty-bucket" ,  "" ,  "" ,  "" ,  111100000 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										// Testing for all 10 objects in the bucket (18).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "" ,  10 ,  resultCases [ 0 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										//Testing for negative value of maxKey, this should set maxKeys to listObjectsLimit (19).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "" ,  - 1 ,  resultCases [ 0 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing for very large value of maxKey, this should set maxKeys to listObjectsLimit (20).
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-05 17:36:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "" ,  1234567890 ,  resultCases [ 0 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing for trancated value (21-24).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "" ,  5 ,  resultCases [ 1 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "" ,  4 ,  resultCases [ 2 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "" ,  3 ,  resultCases [ 3 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "" ,  "" ,  1 ,  resultCases [ 4 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing with prefix (25-28).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "" ,  "" ,  3 ,  resultCases [ 5 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "" ,  "" ,  4 ,  resultCases [ 5 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "" ,  "" ,  5 ,  resultCases [ 5 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "obj" ,  "" ,  "" ,  3 ,  resultCases [ 6 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing with prefix and truncation (29-30).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "" ,  "" ,  1 ,  resultCases [ 7 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "obj" ,  "" ,  "" ,  2 ,  resultCases [ 8 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing with marker, but without prefix and truncation (31-35).
 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "newPrefix0" ,  "" ,  6 ,  resultCases [ 9 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "newPrefix1" ,  "" ,  5 ,  resultCases [ 10 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "obj0" ,  "" ,  4 ,  resultCases [ 11 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "obj1" ,  "" ,  2 ,  resultCases [ 12 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "man" ,  "" ,  11 ,  resultCases [ 13 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Marker being set to a value which is greater than and all object names when sorted (36).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Expected to send an empty response in this case.
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "zen" ,  "" ,  10 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Marker being set to a value which is lesser than and all object names when sorted (37).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Expected to send all the objects in the bucket in this case.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "Abc" ,  "" ,  10 ,  resultCases [ 14 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Marker is to a hierarhical value (38-39).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "Asia/India/India-summer-photos-1" ,  "" ,  10 ,  resultCases [ 15 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "Asia/India/Karnataka/Bangalore/Koramangala/pics" ,  "" ,  10 ,  resultCases [ 16 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing with marker and truncation, but no prefix (40-42).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "newPrefix0" ,  "" ,  3 ,  resultCases [ 17 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "newPrefix1" ,  "" ,  1 ,  resultCases [ 18 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "obj0" ,  "" ,  1 ,  resultCases [ 19 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing with both marker and prefix, but without truncation (43-45).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// The valid combination of marker and prefix should satisfy strings.HasPrefix(marker, prefix).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "obj" ,  "obj0" ,  "" ,  2 ,  resultCases [ 20 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "obj" ,  "obj1" ,  "" ,  1 ,  resultCases [ 21 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "newPrefix0" ,  "" ,  2 ,  resultCases [ 22 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Testing with maxKeys set to 0 (46-52).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// The parameters have to valid.
 
							 
						 
					
						
							
								
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											 
										 
										
											2016-04-03 16:34:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "obj1" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "obj0" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "obj" ,  "" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "obj" ,  "obj0" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "obj" ,  "obj1" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "newPrefix0" ,  "" ,  0 ,  ListObjectsInfo { } ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Tests on hierarchical key names as prefix.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Without delimteter the code should recurse into the prefix Dir.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Tests with prefix, but without delimiter (53-54).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "Asia/India/" ,  "" ,  "" ,  10 ,  resultCases [ 23 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "Asia" ,  "" ,  "" ,  10 ,  resultCases [ 24 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Tests with prefix and delimiter (55-57).
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-15 17:44:48 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// With delimeter the code should not recurse into the sub-directories of prefix Dir.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "Asia" ,  "" ,  "/" ,  10 ,  resultCases [ 25 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "new" ,  "" ,  "/" ,  10 ,  resultCases [ 26 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "Asia/India/" ,  "" ,  "/" ,  10 ,  resultCases [ 27 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Test with marker set as hierarhical value and with delimiter. (58-59)
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "Asia/India/India-summer-photos-1" ,  "/" ,  10 ,  resultCases [ 28 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "" ,  "Asia/India/Karnataka/Bangalore/Koramangala/pics" ,  "/" ,  10 ,  resultCases [ 29 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Test with prefix and delimiter set to '/'. (60)
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-28 06:43:51 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "/" ,  "" ,  "/" ,  10 ,  resultCases [ 30 ] ,  nil ,  true } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-17 04:06:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Test with invalid prefix (61)
 
							 
						 
					
						
							
								
									
										
										
										
											2016-10-01 07:56:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ "test-bucket-list-object" ,  "\\" ,  "" ,  "/" ,  10 ,  resultCases [ 30 ] ,  ObjectNameInvalid { Bucket :  "test-bucket-list-object" ,  Object :  "\\" } ,  false } , 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  i ,  testCase  :=  range  testCases  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-16 04:27:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										result ,  err  :=  obj . ListObjects ( context . Background ( ) ,  testCase . bucketName ,  testCase . prefix ,  testCase . marker ,  testCase . delimeter ,  int ( testCase . maxKeys ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  &&  testCase . shouldPass  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											t . Errorf ( "Test %d: %s:  Expected to pass, but failed with: <ERROR> %s" ,  i + 1 ,  instanceType ,  err . Error ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  err  ==  nil  &&  ! testCase . shouldPass  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											t . Errorf ( "Test %d: %s: Expected to fail with <ERROR> \"%s\", but passed instead" ,  i + 1 ,  instanceType ,  testCase . err . Error ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Failed as expected, but does it fail for the expected reason.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  &&  ! testCase . shouldPass  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 05:24:10 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											if  ! strings . Contains ( err . Error ( ) ,  testCase . err . Error ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												t . Errorf ( "Test %d: %s: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead" ,  i + 1 ,  instanceType ,  testCase . err . Error ( ) ,  err . Error ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-06 03:51:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Since there are cases for which ListObjects fails, this is
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// necessary. Test passes as expected, but the output values
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// are verified for correctness here.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  err  ==  nil  &&  testCase . shouldPass  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-06 03:51:56 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											// The length of the expected ListObjectsResult.Objects
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// should match in both expected result from test cases
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// and in the output. On failure calling t.Fatalf,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// otherwise it may lead to index out of range error in
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// assertion following this.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											if  len ( testCase . result . Objects )  !=  len ( result . Objects )  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												t . Fatalf ( "Test %d: %s: Expected number of object in the result to be '%d', but found '%d' objects instead" ,  i + 1 ,  instanceType ,  len ( testCase . result . Objects ) ,  len ( result . Objects ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											for  j  :=  0 ;  j  <  len ( testCase . result . Objects ) ;  j ++  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  testCase . result . Objects [ j ] . Name  !=  result . Objects [ j ] . Name  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													t . Errorf ( "Test %d: %s: Expected object name to be \"%s\", but found \"%s\" instead" ,  i + 1 ,  instanceType ,  testCase . result . Objects [ j ] . Name ,  result . Objects [ j ] . Name ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-06 07:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												//FIXME: we should always check for ETag
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  result . Objects [ j ] . ETag  ==  ""  &&  ! strings . HasSuffix ( result . Objects [ j ] . Name ,  slashSeparator )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													t . Errorf ( "Test %d: %s: Expected ETag to be not empty, but found empty instead (%v)" ,  i + 1 ,  instanceType ,  result . Objects [ j ] . Name ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-14 03:48:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  testCase . result . IsTruncated  !=  result . IsTruncated  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-07 02:57:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												t . Errorf ( "Test %d: %s: Expected IsTruncated flag to be %v, but instead found it to be %v" ,  i + 1 ,  instanceType ,  testCase . result . IsTruncated ,  result . IsTruncated ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-12-21 05:30:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											if  testCase . result . IsTruncated  &&  result . NextMarker  ==  ""  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												t . Errorf ( "Test %d: %s: Expected NextContinuationToken to contain a string since listing is truncated, but instead found it to be empty" ,  i + 1 ,  instanceType ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ! testCase . result . IsTruncated  &&  result . NextMarker  !=  ""  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												t . Errorf ( "Test %d: %s: Expected NextContinuationToken to be empty since listing is not truncated, but instead found `%v`" ,  i + 1 ,  instanceType ,  result . NextMarker ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										// Take ListObject treeWalk go-routine to completion, if available in the treewalk pool.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  result . IsTruncated  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-16 04:27:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											_ ,  err  =  obj . ListObjects ( context . Background ( ) ,  testCase . bucketName ,  testCase . prefix ,  result . NextMarker ,  testCase . delimeter ,  1000 ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 06:52:12 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												t . Fatal ( err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-01 04:57:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// Initialize FS backend for the benchmark.
  
						 
					
						
							
								
									
										
										
										
											2016-10-06 03:48:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								func  initFSObjectsB ( disk  string ,  t  * testing . B )  ( obj  ObjectLayer )  {  
						 
					
						
							
								
									
										
										
										
											2017-01-17 09:05:00 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  err  error 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-21 04:21:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									obj ,  err  =  NewFSObjectLayer ( disk ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-10-06 03:48:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										t . Fatal ( "Unexpected err: " ,  err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  obj 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-01 04:57:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// BenchmarkListObjects - Run ListObject Repeatedly and benchmark.
  
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								func  BenchmarkListObjects ( b  * testing . B )  {  
						 
					
						
							
								
									
										
										
										
											2016-04-09 01:37:38 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									// Make a temporary directory to use as the obj.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-16 14:25:05 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									directory ,  err  :=  ioutil . TempDir ( globalTestTmpDir ,  "minio-list-benchmark" ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 05:24:10 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										b . Fatal ( err ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-13 10:25:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									defer  os . RemoveAll ( directory ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-09 01:37:38 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									// Create the obj.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-10-06 03:48:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									obj  :=  initFSObjectsB ( directory ,  b ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-01 04:57:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bucket  :=  "ls-benchmark-bucket" 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									// Create a bucket.
 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-16 04:27:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									err  =  obj . MakeBucketWithLocation ( context . Background ( ) ,  bucket ,  "" ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										b . Fatal ( err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-01 04:57:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// Insert objects to be listed and benchmarked later.
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									for  i  :=  0 ;  i  <  20000 ;  i ++  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										key  :=  "obj"  +  strconv . Itoa ( i ) 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-09 13:31:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										_ ,  err  =  obj . PutObject ( context . Background ( ) ,  bucket ,  key ,  mustGetPutObjReader ( b ,  bytes . NewBufferString ( key ) ,  int64 ( len ( key ) ) ,  "" ,  "" ) ,  ObjectOptions { } ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											b . Fatal ( err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									b . ResetTimer ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// List the buckets over and over and over.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  i  :=  0 ;  i  <  b . N ;  i ++  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-16 04:27:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										_ ,  err  =  obj . ListObjects ( context . Background ( ) ,  bucket ,  "" ,  "obj9000" ,  "" ,  - 1 ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-17 08:30:22 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											b . Fatal ( err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}