Skip to content

Test/network agnostic tests #816

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

iadmytro
Copy link
Contributor

Context

Having dependency on particular testnet making regression suite very fragile and require substantial amount of work to switch to another testnet

Proposed Solution

Make regression suite network agnostic by querying db for suitable data for each test.

Important Changes Introduced

Network agnostic tests is a tradeoff, asserts performed by these tests not so rigorous as matching hardcoded snapshot.

@iadmytro iadmytro requested a review from rhyslbw February 13, 2023 08:44
@rhyslbw rhyslbw force-pushed the test/network-agnostic-tests branch from df2aa88 to 42144ce Compare February 13, 2023 18:11
Copy link
Contributor

@rhyslbw rhyslbw left a comment

Choose a reason for hiding this comment

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

Looks good @iadmytro. It would be best to hoist getTestData to avoid defining the same function in each file. Also, these tests shouldn't be run with cardano-db-sync running, otherwise there are race conditions between querying for test data and then calling the API.

@iadmytro iadmytro force-pushed the test/network-agnostic-tests branch from 42144ce to b8bd71d Compare February 14, 2023 12:46
@iadmytro
Copy link
Contributor Author

Hoisting of getTestData addressed in b8bd71d

@iadmytro iadmytro requested a review from rhyslbw February 14, 2023 12:51
@iadmytro iadmytro force-pushed the test/network-agnostic-tests branch from b8bd71d to f73e66c Compare February 14, 2023 12:53
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.

2 participants