Skip to content

Decouple headtracker tests#13397

Merged
dimriou merged 29 commits intodevelopfrom
decouple_headtracker_tests
Jun 5, 2024
Merged

Decouple headtracker tests#13397
dimriou merged 29 commits intodevelopfrom
decouple_headtracker_tests

Conversation

@dimriou
Copy link
Copy Markdown
Collaborator

@dimriou dimriou commented Jun 3, 2024

Removed as many Core dependencies as we could from head tracker tests. Only package left is pgtest

@dimriou dimriou marked this pull request as ready for review June 3, 2024 16:33
@dimriou dimriou requested review from a team as code owners June 3, 2024 16:33
amit-momin
amit-momin previously approved these changes Jun 3, 2024
An error occurred while trying to automatically change base from decouple_config_tests to develop June 4, 2024 12:16
@dimriou dimriou changed the base branch from decouple_config_tests to develop June 4, 2024 13:47
@dimriou dimriou dismissed amit-momin’s stale review June 4, 2024 13:47

The base branch was changed.

@dimriou dimriou requested a review from a team as a code owner June 4, 2024 13:47
@jmank88
Copy link
Copy Markdown
Contributor

jmank88 commented Jun 4, 2024

Only package left is pgtest

Which part of the API is used? Some of that package can move to chainlink-common (or it may already have equivalents), but the txdb stuff is complex and worth investigating alternatives (which have already been exploring for core besides, without this extra complexity)

@dimriou
Copy link
Copy Markdown
Collaborator Author

dimriou commented Jun 4, 2024

Only package left is pgtest

Which part of the API is used? Some of that package can move to chainlink-common (or it may already have equivalents), but the txdb stuff is complex and worth investigating alternatives (which have already been exploring for core besides, without this extra complexity)

That's actually something I wanted to chat about at some point, but the biggest problem I see is that orm_test and similar files assume a db state that is currently located in Core. pgtest is used as a bootstraper for such tests so I'm not sure if there is an easy way to get around this even if we pull some code inside chainlink-common.
For example, in Head Tracker package, ther orm tests will try to execute the queries in a mock DB and they assume the state is already there but the db schema actually lives inside Core.

@jmank88
Copy link
Copy Markdown
Contributor

jmank88 commented Jun 4, 2024

That's actually something I wanted to chat about at some point, but the biggest problem I see is that orm_test and similar files assume a db state that is currently located in Core. pgtest is used as a bootstraper for such tests so I'm not sure if there is an easy way to get around this even if we pull some code inside chainlink-common. For example, in Head Tracker package, ther orm tests will try to execute the queries in a mock DB and they assume the state is already there but the db schema actually lives inside Core.

@krehermann might have some opinions

@dimriou dimriou added this pull request to the merge queue Jun 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 5, 2024
@dimriou dimriou added this pull request to the merge queue Jun 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 5, 2024
@dimriou dimriou added this pull request to the merge queue Jun 5, 2024
Merged via the queue into develop with commit daf8cf6 Jun 5, 2024
@dimriou dimriou deleted the decouple_headtracker_tests branch June 5, 2024 17:01
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