-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor LC handlers Tests #14834
Refactor LC handlers Tests #14834
Conversation
|
||
db := dbtesting.SetupDB(t) | ||
db := dbtesting.SetupDB(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.
This can be done once before all tests
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.
If I were to call it only once before all tests, then I need a way to clean the db at the end of each test, so the next test gets a fresh db, because otherwise they will have conflicting data. but I can't find any methods that does this.
Also if we can't save all the updates at once, since then the tests would be dependent on each other's ordering. and also some of the tests need "broken" updates to be stored in the db, so it would mess up the other tests' point.
} | ||
|
||
func TestLightClientHandler_GetLightClientOptimisticUpdateAltair(t *testing.T) { | ||
func TestLightClientHandler_GetLightClientFinalityUpdate(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.
you only have Altair covered
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.
Yes, this PR is supposed to be just a refactor of the tests and not to add any new functionality/test.
7c17af2
What type of PR is this?
Other
What does this PR do? Why is it needed?
This PR refactors the light client handlers tests, and bundles them together, to make it easier and cleaner to add more tests.
Which issues(s) does this PR fix?
Part of #12991
Other notes for review
I don't think this PR needs a changelog entry since it's not user-facing and it does not add/remove/change functionality.