From bce86048e1f1af58b922d00215148853f81d0cc3 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Tue, 23 Jan 2024 14:11:36 +0400 Subject: [PATCH] refactor: Move test_account crate to the /tests dir (#918) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ - Moves `test_account` crate to the `/tests` instead of `/lib` - Marks is as `publish = false` in Cargo.toml. ## Why ❔ - It's a test-only dep, so it makes more sense there. - We're going to publish everything in `/lib` soon-ish, so if it'll be there unpublished, it may be confusing. ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `zk spellcheck`. --- Cargo.toml | 2 +- core/lib/multivm/Cargo.toml | 2 +- core/lib/zksync_core/Cargo.toml | 2 +- core/{lib => tests}/test_account/Cargo.toml | 11 ++++++----- core/{lib => tests}/test_account/src/lib.rs | 0 5 files changed, 9 insertions(+), 8 deletions(-) rename core/{lib => tests}/test_account/Cargo.toml (58%) rename core/{lib => tests}/test_account/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index cd823972a01c..3487716a8d3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,9 +36,9 @@ members = [ "core/lib/vlog", "core/lib/multivm", "core/lib/web3_decl", - "core/lib/test_account", # Test infrastructure + "core/tests/test_account", "core/tests/cross_external_nodes_checker", "core/tests/loadnext", "core/tests/vm-benchmark", diff --git a/core/lib/multivm/Cargo.toml b/core/lib/multivm/Cargo.toml index fc7218e16e2c..b30714d2cc3f 100644 --- a/core/lib/multivm/Cargo.toml +++ b/core/lib/multivm/Cargo.toml @@ -36,6 +36,6 @@ vise = { git = "https://github.com/matter-labs/vise.git", version = "0.1.0", rev [dev-dependencies] tokio = { version = "1", features = ["time"] } -zksync_test_account = { path = "../test_account" } +zksync_test_account = { path = "../../tests/test_account" } ethabi = "18.0.0" zksync_eth_signer = { path = "../eth_signer" } diff --git a/core/lib/zksync_core/Cargo.toml b/core/lib/zksync_core/Cargo.toml index af62e4afff58..a27281fb7f5b 100644 --- a/core/lib/zksync_core/Cargo.toml +++ b/core/lib/zksync_core/Cargo.toml @@ -86,7 +86,7 @@ actix-web = "4.0.0-beta.8" tracing = "0.1.26" [dev-dependencies] -zksync_test_account = { path = "../test_account" } +zksync_test_account = { path = "../../tests/test_account" } assert_matches = "1.5" jsonrpsee = "0.21.0" diff --git a/core/lib/test_account/Cargo.toml b/core/tests/test_account/Cargo.toml similarity index 58% rename from core/lib/test_account/Cargo.toml rename to core/tests/test_account/Cargo.toml index 572b5c2d09c7..2c6d206b8dd3 100644 --- a/core/lib/test_account/Cargo.toml +++ b/core/tests/test_account/Cargo.toml @@ -9,13 +9,14 @@ license = "MIT OR Apache-2.0" keywords = ["blockchain", "zksync"] categories = ["cryptography"] readme = "README.md" +publish = false [dependencies] -zksync_types = { path = "../types" } -zksync_system_constants = { path = "../constants" } -zksync_utils = { path = "../utils" } -zksync_eth_signer = { path = "../eth_signer" } -zksync_contracts = { path = "../contracts" } +zksync_types = { path = "../../lib/types" } +zksync_system_constants = { path = "../../lib/constants" } +zksync_utils = { path = "../../lib/utils" } +zksync_eth_signer = { path = "../../lib/eth_signer" } +zksync_contracts = { path = "../../lib/contracts" } hex = "0.4" ethabi = "18.0.0" diff --git a/core/lib/test_account/src/lib.rs b/core/tests/test_account/src/lib.rs similarity index 100% rename from core/lib/test_account/src/lib.rs rename to core/tests/test_account/src/lib.rs