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

Rewrite world mocking #2292

Closed
Arjentix opened this issue May 30, 2022 · 1 comment
Closed

Rewrite world mocking #2292

Arjentix opened this issue May 30, 2022 · 1 comment
Assignees
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality Tests

Comments

@Arjentix
Copy link
Contributor

World mocking using WorldTrait is quite painful and causes some problems and inconsistency especially after merge of #2284

We need to find another way to mock World for tests.
Some solutions I can see right now:

  1. Use mockall crate
  2. Remove mocking at all and do some test runtime preparation using genesis, instructions and other supported things
  3. Like 2 but use procedural macro for that
@Arjentix Arjentix added iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality Tests labels May 30, 2022
@appetrosyan
Copy link
Contributor

The option 1. should be the first thing that we try. We don't want to maintain a separate non-compliant mocking library inside of Iroha. To me this is a relatively large change, so we should put this off until after the LTS is released.

The option 2 is something that we will need to do eventually, since test_network only crudely approximates the behaviour of a real system. I think that we need to have a lot more real integration tests, and improve the coverage with unit tests.

@Arjentix Arjentix self-assigned this Jun 6, 2022
Arjentix added a commit that referenced this issue Jun 14, 2022
BAStos525 pushed a commit to BAStos525/soramitsu-iroha that referenced this issue Jul 8, 2022
…cs from `IsAllowedBoxed` (hyperledger-iroha#2284)

Signed-off-by: Daniil Polyakov <[email protected]>
Signed-off-by: BAStos525 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST Refactor Improvement to overall code quality Tests
Projects
None yet
Development

No branches or pull requests

2 participants