-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add test for finality violation. #394
Conversation
@@ -58,3 +62,34 @@ func TestDoubleWrap(t *testing.T) { | |||
doubleWrapped := contractreader.NewExtendedContractReader(cr) | |||
require.Equal(t, wrapped, doubleWrapped) | |||
} | |||
|
|||
func TestFinalityViolation(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a dedicated task for e2e tests covering reorgs on the chainlink repo level, but can we also have more integration tests (similar to plugin_e2e_test in the chainlink-ccip) covering that part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why not. This test just makes sure HealthReport()
is checked after IO.
|
||
func TestFinalityViolation(t *testing.T) { | ||
cr := chainreadermocks.NewMockContractReaderFacade(t) | ||
cr.EXPECT().HealthReport().Return(map[string]error{"farmerwolfcabbagegoat": types.ErrFinalityViolated}).Times(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"farmerwolfcabbagegoat"
hahahaah
|
Add a test that the finality detection error is properly returned.
Followup to #387