Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
infiloop2 committed Sep 27, 2023
1 parent f26fc38 commit f022d6d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,35 @@ func TestEvmRegistry_MultiFeedRequest(t *testing.T) {
},
},
},
{
name: "failure - fail to decode reportBlob",
lookup: &StreamsLookup{
feedParamKey: feedIDs,
feeds: []string{"0x4554482d5553442d415242495452554d2d544553544e45540000000000000000", "0x4254432d5553442d415242495452554d2d544553544e45540000000000000000"},
timeParamKey: timestamp,
time: big.NewInt(123456),
upkeepId: upkeepId,
},
response: &MercuryV03Response{
Reports: []MercuryV03Report{
{
FeedID: "0x4554482d5553442d415242495452554d2d544553544e45540000000000000000",
ValidFromTimestamp: 123456,
ObservationsTimestamp: 123456,
FullReport: "qerwiu", // invalid hex blob
},
{
FeedID: "0x4254432d5553442d415242495452554d2d544553544e45540000000000000000",
ValidFromTimestamp: 123458,
ObservationsTimestamp: 123458,
FullReport: "0xab2123dc00000016",
},
},
},
statusCode: http.StatusOK,
retryable: false,
errorMessage: "All attempts fail:\n#1: hex string without 0x prefix",
},
{
name: "failure - returns retryable",
lookup: &StreamsLookup{
Expand Down

0 comments on commit f022d6d

Please sign in to comment.