@@ -2594,11 +2594,11 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
25942594 chunks := []string {"hello" , "world" }
25952595 totalLength := len (chunks [0 ]) + len (chunks [1 ])
25962596 mockResp := map [int ]struct {
2597- resp * proto.ReadStateBytes_ResponseChunk
2597+ resp * proto.ReadStateBytes_Response
25982598 err error
25992599 }{
26002600 0 : {
2601- resp : & proto.ReadStateBytes_ResponseChunk {
2601+ resp : & proto.ReadStateBytes_Response {
26022602 Bytes : []byte (chunks [0 ]),
26032603 TotalLength : int64 (totalLength ),
26042604 Range : & proto.StateRange {
@@ -2609,7 +2609,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
26092609 err : nil ,
26102610 },
26112611 1 : {
2612- resp : & proto.ReadStateBytes_ResponseChunk {
2612+ resp : & proto.ReadStateBytes_Response {
26132613 Bytes : []byte (chunks [1 ]),
26142614 TotalLength : int64 (totalLength ),
26152615 Range : & proto.StateRange {
@@ -2620,12 +2620,12 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
26202620 err : nil ,
26212621 },
26222622 2 : {
2623- resp : nil ,
2623+ resp : & proto. ReadStateBytes_Response {} ,
26242624 err : io .EOF ,
26252625 },
26262626 }
26272627 var count int
2628- mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_ResponseChunk , error ) {
2628+ mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_Response , error ) {
26292629 ret := mockResp [count ]
26302630 count ++
26312631 return ret .resp , ret .err
@@ -2670,11 +2670,11 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
26702670 var incorrectLength int64 = 999
26712671 correctLength := len (chunks [0 ]) + len (chunks [1 ])
26722672 mockResp := map [int ]struct {
2673- resp * proto.ReadStateBytes_ResponseChunk
2673+ resp * proto.ReadStateBytes_Response
26742674 err error
26752675 }{
26762676 0 : {
2677- resp : & proto.ReadStateBytes_ResponseChunk {
2677+ resp : & proto.ReadStateBytes_Response {
26782678 Bytes : []byte (chunks [0 ]),
26792679 TotalLength : incorrectLength ,
26802680 Range : & proto.StateRange {
@@ -2685,7 +2685,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
26852685 err : nil ,
26862686 },
26872687 1 : {
2688- resp : & proto.ReadStateBytes_ResponseChunk {
2688+ resp : & proto.ReadStateBytes_Response {
26892689 Bytes : []byte (chunks [1 ]),
26902690 TotalLength : incorrectLength ,
26912691 Range : & proto.StateRange {
@@ -2696,12 +2696,12 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
26962696 err : nil ,
26972697 },
26982698 2 : {
2699- resp : nil ,
2699+ resp : & proto. ReadStateBytes_Response {} ,
27002700 err : io .EOF ,
27012701 },
27022702 }
27032703 var count int
2704- mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_ResponseChunk , error ) {
2704+ mockReadBytesClient .EXPECT ().Recv ().DoAndReturn (func () (* proto.ReadStateBytes_Response , error ) {
27052705 ret := mockResp [count ]
27062706 count ++
27072707 return ret .resp , ret .err
@@ -2777,7 +2777,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
27772777 ).Return (mockReadBytesClient , nil )
27782778
27792779 // Define what will be returned by each call to Recv
2780- mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_ResponseChunk {
2780+ mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_Response {
27812781 Diagnostics : []* proto.Diagnostic {
27822782 & proto.Diagnostic {
27832783 Severity : proto .Diagnostic_ERROR ,
@@ -2827,15 +2827,15 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
28272827 ).Return (mockReadBytesClient , nil )
28282828
28292829 // Define what will be returned by each call to Recv
2830- mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_ResponseChunk {
2830+ mockReadBytesClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_Response {
28312831 Diagnostics : []* proto.Diagnostic {
28322832 & proto.Diagnostic {
28332833 Severity : proto .Diagnostic_WARNING ,
28342834 Summary : "Warning from test" ,
28352835 Detail : "This warning is forced by the test case" ,
28362836 },
28372837 },
2838- }, nil )
2838+ }, io . EOF )
28392839
28402840 // Act
28412841 request := providers.ReadStateBytesRequest {
@@ -2876,7 +2876,7 @@ func TestGRPCProvider_ReadStateBytes(t *testing.T) {
28762876 ).Return (mockClient , nil )
28772877
28782878 mockError := errors .New ("grpc error forced in test" )
2879- mockClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_ResponseChunk {}, mockError )
2879+ mockClient .EXPECT ().Recv ().Return (& proto.ReadStateBytes_Response {}, mockError )
28802880
28812881 // Act
28822882 request := providers.ReadStateBytesRequest {
0 commit comments