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

Making End-to-End Tests Idempotent #142

Merged
merged 3 commits into from
Nov 6, 2023
Merged

Conversation

magecnion
Copy link
Contributor

@magecnion magecnion commented Nov 6, 2023

PR Type:

Refactoring, Tests


PR Description:

This PR refactors the end-to-end tests to make them idempotent. This means that the tests can be run multiple times without resetting the test environment. The changes include updating the collection IDs to be dynamic and not hardcoded, and checking for non-zero balances instead of a specific balance in the genesis account.


PR Main Files Walkthrough:

files:

ownership-chain/e2e-tests/tests/test-create-collection.ts: The hardcoded collection IDs have been replaced with dynamic IDs. The collection ID is now obtained from the result of the createCollection method. This change makes the tests idempotent.
ownership-chain/e2e-tests/tests/test-evolution.ts: The hardcoded collection ID has been removed from the global variable. This change is part of the effort to make the tests idempotent.
ownership-chain/e2e-tests/tests/test-web3api.ts: The check for the genesis account balance has been updated. Instead of checking for a specific balance, the test now checks if the balance is greater than zero. This change makes the test more flexible and idempotent.

@magecnion
Copy link
Contributor Author

/describe

@github-actions github-actions bot changed the title make e2e test idempotent so I can run them without resetting zombienet Making End-to-End Tests Idempotent Nov 6, 2023
@magecnion magecnion linked an issue Nov 6, 2023 that may be closed by this pull request
@magecnion magecnion requested a review from a user November 6, 2023 15:42
ghost
ghost previously approved these changes Nov 6, 2023
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

one nitpick

ownership-chain/e2e-tests/tests/test-create-collection.ts Outdated Show resolved Hide resolved
@magecnion magecnion merged commit 52d51ea into main Nov 6, 2023
7 checks passed
@magecnion magecnion deleted the feature/e2e_test_are_idempotent branch November 6, 2023 16:36
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.

EVM events can be obtained via RPC-EVM! (integration test?)
1 participant