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

E2E testing with docker compose #727

Merged
merged 5 commits into from
Jun 20, 2024
Merged

Conversation

piohei
Copy link
Contributor

@piohei piohei commented May 10, 2024

Motivation

This E2E testing will be used mostly for HA solution testing. We need to run multiple instances of sequencer to ensure our prod env will work properly.

Solution

E2E tests are basicly running docker compose under the hood and execute some requests to follow different kind of scenarios. This docker compose can be also used for local development.

PR Checklist

  • Added Tests
  • Added Documentation

@piohei piohei force-pushed the piohei/e2e_test branch 4 times, most recently from a3522c0 to 39276c1 Compare May 23, 2024 08:18
@piohei piohei force-pushed the piohei/e2e_test branch from 39276c1 to fc372bc Compare June 6, 2024 07:46
@piohei
Copy link
Contributor Author

piohei commented Jun 6, 2024

I've added option for parallel run. There are few things left:

  • Is it safe to commit into this repo keys for insertion prover and deletion prover?
  • I'm not sure if I've done right things with committing docker compose with anvil args where I use url for fork that includes API key for alchemy.
  • When do we want to run these tests? They will be the slowest ones.

@piohei piohei requested a review from Dzejkop June 6, 2024 08:10
@Dzejkop
Copy link
Contributor

Dzejkop commented Jun 7, 2024

I've added option for parallel run. There are few things left:

  • Is it safe to commit into this repo keys for insertion prover and deletion prover?
  • I'm not sure if I've done right things with committing docker compose with anvil args where I use url for fork that includes API key for alchemy.
  • When do we want to run these tests? They will be the slowest ones.

We can include keys no problem. The API keys is a bit problematic though. Maybe we can pass it through GH secrets?

Regarding when to run these - how about we set a cronjob and run it a couple times a day?

@Dzejkop
Copy link
Contributor

Dzejkop commented Jun 7, 2024

how about we set a cronjob and run it a couple times a day?
alternatively everytime we push a tag?

@piohei
Copy link
Contributor Author

piohei commented Jun 7, 2024

how about we set a cronjob and run it a couple times a day?
alternatively everytime we push a tag?

Tag sounds good to me and makes sense. We will treat it as "last checkpoint" before going on with deploy. :)

@piohei
Copy link
Contributor Author

piohei commented Jun 7, 2024

I've added option for parallel run. There are few things left:

  • Is it safe to commit into this repo keys for insertion prover and deletion prover?
  • I'm not sure if I've done right things with committing docker compose with anvil args where I use url for fork that includes API key for alchemy.
  • When do we want to run these tests? They will be the slowest ones.

We can include keys no problem. The API keys is a bit problematic though. Maybe we can pass it through GH secrets?

Regarding when to run these - how about we set a cronjob and run it a couple times a day?

I will set this API key as env. Then we can use GH secrets for CI. :)

@piohei piohei force-pushed the piohei/e2e_test branch from fc372bc to 57c51d7 Compare June 10, 2024 09:19
@piohei
Copy link
Contributor Author

piohei commented Jun 10, 2024

Summing up:

  • Alchemy API key is now passed as ENV ALCHEMY_API_KEY
  • We will run e2e tests on tag creation in GitHub (not part of that commit)
  • MTB keys - we can store them in repo from the security perspective but they are too big :(
remote: error: File e2e_tests/docker-compose/keys/deletion_b10t30.ps is 143.42 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File e2e_tests/docker-compose/keys/insertion_b10t30.ps is 250.49 MB; this exceeds GitHub's file size limit of 100.00 MB

Any idea how and where we can store them and retrieve easily for e2e testing? Can we run tests with lower tree depth?

@piohei piohei force-pushed the piohei/e2e_test branch from 57c51d7 to 0903d3e Compare June 10, 2024 11:25
@piohei
Copy link
Contributor Author

piohei commented Jun 10, 2024

Docker compose execution downloads MTB keys if they are not present.

@piohei piohei force-pushed the piohei/e2e_test branch 2 times, most recently from 84b3375 to 34309f4 Compare June 12, 2024 10:26
@piohei piohei marked this pull request as ready for review June 12, 2024 10:27
@piohei piohei requested a review from a team as a code owner June 12, 2024 10:27
@piohei piohei requested a review from Dzejkop June 12, 2024 10:27
@piohei piohei force-pushed the piohei/e2e_test branch from 34309f4 to 1e1fec9 Compare June 12, 2024 13:21
@piohei piohei requested a review from Dzejkop June 12, 2024 13:55
@piohei piohei force-pushed the piohei/e2e_test branch from 1e1fec9 to 9dbf366 Compare June 12, 2024 14:11
@piohei piohei changed the title Draft of e2e testing with docker compose E2E testing with docker compose Jun 12, 2024
e2e_tests/scenarios/tests/common/api.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/common/api.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/common/api.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/common/mod.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/insert_restart_insert.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/insert_restart_insert.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/insert_restart_insert.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/common/docker_compose.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/common/api.rs Outdated Show resolved Hide resolved
e2e_tests/scenarios/tests/common/api.rs Outdated Show resolved Hide resolved
Co-authored-by: 0xKitsune <77890308+0xKitsune@users.noreply.github.com>
@0xKitsune 0xKitsune merged commit 8edd963 into worldcoin:main Jun 20, 2024
3 checks passed
@piohei piohei deleted the piohei/e2e_test branch June 24, 2024 11:43
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