Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/loop/internal/test/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/interfacetests/codec_interface_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading