@@ -843,11 +843,41 @@ func TestGetBlockList_PutBlockList(t *testing.T) {
843843 if expected := blockId ; expected != thatBlock .Name {
844844 t .Fatalf ("Wrong block name. Expected: %s, got: %s" , expected , thatBlock .Name )
845845 }
846- if expected := uint64 (len (chunk )); expected != thatBlock .Size {
846+ if expected := int64 (len (chunk )); expected != thatBlock .Size {
847847 t .Fatalf ("Wrong block name. Expected: %d, got: %d" , expected , thatBlock .Size )
848848 }
849849}
850850
851+ func TestCreateBlockBlob (t * testing.T ) {
852+ cli , err := getBlobClient ()
853+ if err != nil {
854+ t .Fatal (err )
855+ }
856+
857+ cnt := randContainer ()
858+ if err := cli .CreateContainer (cnt , ContainerAccessTypePrivate ); err != nil {
859+ t .Fatal (err )
860+ }
861+ defer cli .deleteContainer (cnt )
862+
863+ blob := randString (20 )
864+ if err := cli .CreateBlockBlob (cnt , blob ); err != nil {
865+ t .Fatal (err )
866+ }
867+
868+ // Verify
869+ blocks , err := cli .GetBlockList (cnt , blob , BlockListTypeAll )
870+ if err != nil {
871+ t .Fatal (err )
872+ }
873+ if expected , got := 0 , len (blocks .CommittedBlocks ); expected != got {
874+ t .Fatalf ("Got wrong committed block count. Expected: %v, Got:%v " , expected , got )
875+ }
876+ if expected , got := 0 , len (blocks .UncommittedBlocks ); expected != got {
877+ t .Fatalf ("Got wrong uncommitted block count. Expected: %v, Got:%v " , expected , got )
878+ }
879+ }
880+
851881func TestPutPageBlob (t * testing.T ) {
852882 cli , err := getBlobClient ()
853883 if err != nil {
0 commit comments