@@ -3519,11 +3519,11 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
35193519 chunks := []string {"hello" , "world" }
35203520 totalLength := len (chunks [0 ]) + len (chunks [1 ])
35213521 mockResp := map [int ]struct {
3522- resp * proto.ReadStateBytes_ResponseChunk
3522+ resp * proto.ReadStateBytes_Response
35233523 err error
35243524 }{
35253525 0 : {
3526- resp : & proto.ReadStateBytes_ResponseChunk {
3526+ resp : & proto.ReadStateBytes_Response {
35273527 Bytes : []byte (chunks [0 ]),
35283528 TotalLength : int64 (totalLength ),
35293529 Range : & proto.StateRange {
@@ -3534,7 +3534,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
35343534 err : nil ,
35353535 },
35363536 1 : {
3537- resp : & proto.ReadStateBytes_ResponseChunk {
3537+ resp : & proto.ReadStateBytes_Response {
35383538 Bytes : []byte (chunks [1 ]),
35393539 TotalLength : int64 (totalLength ),
35403540 Range : & proto.StateRange {
@@ -3545,12 +3545,12 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
35453545 err : nil ,
35463546 },
35473547 2 : {
3548- resp : nil ,
3548+ resp : & proto. ReadStateBytes_Response {} ,
35493549 err : io .EOF ,
35503550 },
35513551 }
35523552 var count int
3553- mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_ResponseChunk , error ) {
3553+ mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_Response , error ) {
35543554 ret := mockResp [count ]
35553555 count ++
35563556 return ret .resp , ret .err
@@ -3595,11 +3595,11 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
35953595 var incorrectLength int64 = 999
35963596 correctLength := len (chunks [0 ]) + len (chunks [1 ])
35973597 mockResp := map [int ]struct {
3598- resp * proto.ReadStateBytes_ResponseChunk
3598+ resp * proto.ReadStateBytes_Response
35993599 err error
36003600 }{
36013601 0 : {
3602- resp : & proto.ReadStateBytes_ResponseChunk {
3602+ resp : & proto.ReadStateBytes_Response {
36033603 Bytes : []byte (chunks [0 ]),
36043604 TotalLength : incorrectLength ,
36053605 Range : & proto.StateRange {
@@ -3610,7 +3610,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
36103610 err : nil ,
36113611 },
36123612 1 : {
3613- resp : & proto.ReadStateBytes_ResponseChunk {
3613+ resp : & proto.ReadStateBytes_Response {
36143614 Bytes : []byte (chunks [1 ]),
36153615 TotalLength : incorrectLength ,
36163616 Range : & proto.StateRange {
@@ -3621,12 +3621,12 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
36213621 err : nil ,
36223622 },
36233623 2 : {
3624- resp : nil ,
3624+ resp : & proto. ReadStateBytes_Response {} ,
36253625 err : io .EOF ,
36263626 },
36273627 }
36283628 var count int
3629- mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_ResponseChunk , error ) {
3629+ mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_Response , error ) {
36303630 ret := mockResp [count ]
36313631 count ++
36323632 return ret .resp , ret .err
@@ -3702,7 +3702,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
37023702 ).Return (mockReadBytesClient , nil )
37033703
37043704 // Define what will be returned by each call to Recv
3705- mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_ResponseChunk {
3705+ mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_Response {
37063706 Diagnostics : []* proto.Diagnostic {
37073707 & proto.Diagnostic {
37083708 Severity : proto .Diagnostic_ERROR ,
@@ -3752,15 +3752,15 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
37523752 ).Return (mockReadBytesClient , nil )
37533753
37543754 // Define what will be returned by each call to Recv
3755- mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_ResponseChunk {
3755+ mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_Response {
37563756 Diagnostics : []* proto.Diagnostic {
37573757 & proto.Diagnostic {
37583758 Severity : proto .Diagnostic_WARNING ,
37593759 Summary : "Warning from test" ,
37603760 Detail : "This warning is forced by the test case" ,
37613761 },
37623762 },
3763- }, nil )
3763+ }, io . EOF )
37643764
37653765 // Act
37663766 request := providers.ReadStateBytesRequest {
@@ -3801,7 +3801,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
38013801 ).Return (mockClient , nil )
38023802
38033803 mockError := errors .New ("grpc error forced in test" )
3804- mockClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_ResponseChunk {}, mockError )
3804+ mockClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_Response {}, mockError )
38053805
38063806 // Act
38073807 request := providers.ReadStateBytesRequest {
0 commit comments