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

Add test for finality violation. #394

Merged
merged 6 commits into from
Jan 7, 2025
Merged

Add test for finality violation. #394

merged 6 commits into from
Jan 7, 2025

Conversation

winder
Copy link
Contributor

@winder winder commented Dec 19, 2024

Add a test that the finality detection error is properly returned.

Followup to #387

@winder winder marked this pull request as ready for review December 20, 2024 17:13
@winder winder requested a review from a team as a code owner December 20, 2024 17:13
@@ -58,3 +62,34 @@ func TestDoubleWrap(t *testing.T) {
doubleWrapped := contractreader.NewExtendedContractReader(cr)
require.Equal(t, wrapped, doubleWrapped)
}

func TestFinalityViolation(t *testing.T) {
Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"farmerwolfcabbagegoat"
hahahaah

Copy link

github-actions bot commented Jan 7, 2025

Metric will/fv-test main
Coverage 76.7% 76.4%

@winder winder merged commit 0e95111 into main Jan 7, 2025
17 checks passed
@winder winder deleted the will/fv-test branch January 7, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants