From 4acf10f4065b60f4cc33c17321ea6c856fbd626f Mon Sep 17 00:00:00 2001 From: Ryan Tinianov Date: Tue, 7 Nov 2023 10:37:08 -0500 Subject: [PATCH] Fix a typo in the codec interface test. The dummy used to test the relay didn't care, but real implmentations will have a decoding error (#224) --- pkg/loop/internal/test/config.go | 2 +- pkg/types/interfacetests/codec_interface_tests.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/loop/internal/test/config.go b/pkg/loop/internal/test/config.go index 6f71c3420..2ec72ccfd 100644 --- a/pkg/loop/internal/test/config.go +++ b/pkg/loop/internal/test/config.go @@ -107,7 +107,7 @@ func (c staticChainReader) Decode(ctx context.Context, raw []byte, into any, ite return errors.New("not used for these test") } -func (f staticChainReader) GetLatestValue(ctx context.Context, bc types.BoundContract, method string, params, returnVal any) error { +func (c staticChainReader) GetLatestValue(ctx context.Context, bc types.BoundContract, method string, params, returnVal any) error { if !assert.ObjectsAreEqual(bc, boundContract) { return fmt.Errorf("expected report context %v but got %v", boundContract, bc) } diff --git a/pkg/types/interfacetests/codec_interface_tests.go b/pkg/types/interfacetests/codec_interface_tests.go index c582acccf..1f2e26c9b 100644 --- a/pkg/types/interfacetests/codec_interface_tests.go +++ b/pkg/types/interfacetests/codec_interface_tests.go @@ -126,7 +126,7 @@ func RunChainReaderInterfaceTests(t *testing.T, tester ChainReaderInterfaceTeste assert.Equal(t, resp, actualEncoding) var into [1]TestStruct - require.NoError(t, codec.Decode(ctx, actualEncoding, &into, TestItemArray2Type)) + require.NoError(t, codec.Decode(ctx, actualEncoding, &into, TestItemArray1Type)) assert.Equal(t, items, into) }, "Returns an error if type is undefined": func(t *testing.T) {