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

Proper black-box integration tests MVP #4500

Closed
mversic opened this issue Apr 23, 2024 · 4 comments · Fixed by #5124
Closed

Proper black-box integration tests MVP #4500

mversic opened this issue Apr 23, 2024 · 4 comments · Fixed by #5124
Assignees
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST Tests

Comments

@mversic
Copy link
Contributor

mversic commented Apr 23, 2024

We've long had an issue that our client/tests/integration are not proper black box tests. This means the have iroha as dependency when they shouldn't.

The main goal is to remove iroha and test_network as dev-dependencies of iroha_client. However, the scope of this task is to produce an MVP with only several tests migrated to this new scheme of running integration tests. Later we can migrate all of the tests, but it's important to provide a framework for new tests first.

We should use this to bring up dockers running iroha for every test.

@mversic mversic added iroha2-dev The re-implementation of a BFT hyperledger in RUST Tests labels Apr 23, 2024
@nxsaken
Copy link
Contributor

nxsaken commented May 29, 2024

Questions on the Dockerfile I struggle to find answers to:

  • Why do we use archlinux as the base image for the build stage?
    • this probably isn't that simple, but can't we use something that supports arm64, like alpine?
  • What difference does adding rust-src to the toolchain make?
  • Can we get away with only installing the minimal toolchain (without rustfmt, clippy and rust-docs)?
    • asking because specifying the image to be amd64/archlinux (for testing reasons) makes rustup fail to install rust-docs for some reason

@Erigara
Copy link
Contributor

Erigara commented May 30, 2024

Why do we use archlinux as the base image for the build stage?

Afaik it was chosen just because it's easy to install rust, so imo we can replace it.

@0x009922
Copy link
Contributor

For the reference, iroha-javascript has an internal utility for end-to-end testing: test-peer. It sets up actual iroha binary & clean environment for each test, and tests with it work real fast, surprisingly. It has direct library interface and even a simple stateful HTTP server to control peer execution state.

@0x009922
Copy link
Contributor

We should use this to bring up dockers running iroha for every test.

Do we really need testcontainers for this purpose? While trying to integrate it in tests of iroha-javascript, I found it quite heavy and excessive in comparison to plain child-process execution. Using Docker in tests also opens up an infinite hole of possible Docker-related problems which are usually very hard to debug.

@nxsaken nxsaken removed their assignment Sep 23, 2024
@0x009922 0x009922 self-assigned this Oct 8, 2024
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 Tests
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

4 participants