@@ -23,6 +23,8 @@ import (
2323 "fmt"
2424 "testing"
2525
26+ "github.com/onflow/flow/protobuf/go/flow/entities"
27+
2628 "github.com/stretchr/testify/require"
2729
2830 "github.com/golang/mock/gomock"
@@ -341,7 +343,7 @@ func TestAccess(t *testing.T) {
341343 Return (& emuResult , nil ).
342344 Times (1 )
343345
344- result , err := adapter .GetTransactionResult (context .Background (), txID , blockID , collectionID , nil )
346+ result , err := adapter .GetTransactionResult (context .Background (), txID , blockID , collectionID , entities . EventEncodingVersion_JSON_CDC_V0 )
345347 assert .Equal (t , expected , * result )
346348 assert .NoError (t , err )
347349
@@ -351,7 +353,7 @@ func TestAccess(t *testing.T) {
351353 Return (nil , fmt .Errorf ("some error" )).
352354 Times (1 )
353355
354- result , err = adapter .GetTransactionResult (context .Background (), txID , blockID , collectionID , nil )
356+ result , err = adapter .GetTransactionResult (context .Background (), txID , blockID , collectionID , entities . EventEncodingVersion_JSON_CDC_V0 )
355357 assert .Nil (t , result )
356358 assert .Error (t , err )
357359
@@ -562,7 +564,7 @@ func TestAccess(t *testing.T) {
562564 Return (blockEvents , nil ).
563565 Times (1 )
564566
565- result , err := adapter .GetEventsForHeightRange (context .Background (), eventType , startHeight , endHeight , nil )
567+ result , err := adapter .GetEventsForHeightRange (context .Background (), eventType , startHeight , endHeight , entities . EventEncodingVersion_JSON_CDC_V0 )
566568 assert .Equal (t , expected , result )
567569 assert .NoError (t , err )
568570
@@ -572,7 +574,7 @@ func TestAccess(t *testing.T) {
572574 Return (nil , fmt .Errorf ("some error" )).
573575 Times (1 )
574576
575- result , err = adapter .GetEventsForHeightRange (context .Background (), eventType , startHeight , endHeight , nil )
577+ result , err = adapter .GetEventsForHeightRange (context .Background (), eventType , startHeight , endHeight , entities . EventEncodingVersion_JSON_CDC_V0 )
576578 assert .Nil (t , result )
577579 assert .Error (t , err )
578580
@@ -604,7 +606,7 @@ func TestAccess(t *testing.T) {
604606 Return (blockEvents , nil ).
605607 Times (1 )
606608
607- result , err := adapter .GetEventsForBlockIDs (context .Background (), eventType , blockIDs , nil )
609+ result , err := adapter .GetEventsForBlockIDs (context .Background (), eventType , blockIDs , entities . EventEncodingVersion_JSON_CDC_V0 )
608610 assert .Equal (t , expected , result )
609611 assert .NoError (t , err )
610612
@@ -614,7 +616,7 @@ func TestAccess(t *testing.T) {
614616 Return (nil , fmt .Errorf ("some error" )).
615617 Times (1 )
616618
617- result , err = adapter .GetEventsForBlockIDs (context .Background (), eventType , blockIDs , nil )
619+ result , err = adapter .GetEventsForBlockIDs (context .Background (), eventType , blockIDs , entities . EventEncodingVersion_JSON_CDC_V0 )
618620 assert .Nil (t , result )
619621 assert .Error (t , err )
620622
@@ -643,7 +645,7 @@ func TestAccess(t *testing.T) {
643645 Return (results , nil ).
644646 Times (1 )
645647
646- result , err := adapter .GetTransactionResultByIndex (context .Background (), blockID , index , nil )
648+ result , err := adapter .GetTransactionResultByIndex (context .Background (), blockID , index , entities . EventEncodingVersion_JSON_CDC_V0 )
647649 assert .Equal (t , convertedTXResult , result )
648650 assert .NoError (t , err )
649651
@@ -653,7 +655,7 @@ func TestAccess(t *testing.T) {
653655 Return (nil , fmt .Errorf ("some error" )).
654656 Times (1 )
655657
656- result , err = adapter .GetTransactionResultByIndex (context .Background (), blockID , index , nil )
658+ result , err = adapter .GetTransactionResultByIndex (context .Background (), blockID , index , entities . EventEncodingVersion_JSON_CDC_V0 )
657659 assert .Nil (t , result )
658660 assert .Error (t , err )
659661
@@ -712,7 +714,7 @@ func TestAccess(t *testing.T) {
712714 Return (results , nil ).
713715 Times (1 )
714716
715- result , err := adapter .GetTransactionResultsByBlockID (context .Background (), blockID , nil )
717+ result , err := adapter .GetTransactionResultsByBlockID (context .Background (), blockID , entities . EventEncodingVersion_JSON_CDC_V0 )
716718 assert .Equal (t , expected , result )
717719 assert .NoError (t , err )
718720
@@ -722,7 +724,7 @@ func TestAccess(t *testing.T) {
722724 Return (nil , fmt .Errorf ("some error" )).
723725 Times (1 )
724726
725- result , err = adapter .GetTransactionResultsByBlockID (context .Background (), blockID , nil )
727+ result , err = adapter .GetTransactionResultsByBlockID (context .Background (), blockID , entities . EventEncodingVersion_JSON_CDC_V0 )
726728 assert .Nil (t , result )
727729 assert .Error (t , err )
728730
0 commit comments