File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl BlobClient {
5353 & self ,
5454 container_name : impl Into < String > ,
5555 blob_name : impl Into < String > ,
56+ blob_size : u64 ,
5657 ) -> anyhow:: Result < String > {
5758 let blob_client = self
5859 . client
@@ -61,7 +62,7 @@ impl BlobClient {
6162
6263 let response = blob_client
6364 . get ( )
64- . range ( Range :: new ( 0 , 2048 ) ) // TODO: Fix range nums
65+ . range ( Range :: new ( 0 , blob_size ) ) // TODO: Fix range nums
6566 . execute ( )
6667 . await
6768 . map_err ( |err| anyhow ! ( err) ) ?;
@@ -175,8 +176,9 @@ mod tests {
175176 . await
176177 . unwrap ( ) ;
177178
179+ let blob_size: u64 = 1024 ;
178180 // putしたデータを取得できることを確認する
179- let res = client. get ( "emulcont" , "test.txt" ) . await . unwrap ( ) ;
181+ let res = client. get ( "emulcont" , "test.txt" , blob_size ) . await . unwrap ( ) ;
180182 assert_eq ! ( data, res) ;
181183 }
182184}
You can’t perform that action at this time.
0 commit comments