Skip to content

Commit

Permalink
dev: refactor hive-utils crate and kakarot-rpc::test_utils to test_ut…
Browse files Browse the repository at this point in the history
…ils crate
  • Loading branch information
Harsh Bajpai authored and Harsh Bajpai committed Sep 12, 2023
1 parent dcfc0ba commit a895199
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/eth-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
# for cross-compiling
openssl = { version = "0.10", features = ["vendored"] }

kakarot-test-utils = { path = "../test-utils" }

[dev-dependencies]
cargo-husky = { workspace = true }
ethers = { workspace = true }
rstest = { workspace = true }
kakarot-test-utils = { path = "../test-utils" }
1 change: 0 additions & 1 deletion crates/eth-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub mod api;
pub mod config;
pub mod rpc;
pub mod servers;
pub mod test_utils;

use eyre::Result;
use jsonrpsee::server::{ServerBuilder, ServerHandle};
Expand Down
2 changes: 1 addition & 1 deletion crates/eth-rpc/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ mod integration_tests {

use dotenv::dotenv;
use ethers::prelude::{Block as EthersBlock, Http as EthersHttp, H256 as EthersH256};
use kakarot_rpc::test_utils::start_kakarot_rpc_server;
use kakarot_test_utils::deploy_helpers::KakarotTestEnvironmentContext;
use kakarot_test_utils::fixtures::kakarot_test_env_ctx;
use kakarot_test_utils::rpc_helpers::start_kakarot_rpc_server;
use reth_primitives::U64;
use rstest::*;

Expand Down
4 changes: 4 additions & 0 deletions crates/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ license.workspace = true

[dependencies]
kakarot-rpc-core={ path = "../core" }
kakarot-rpc= { path = "../eth-rpc" }

# rpc
jsonrpsee = { workspace = true }

dojo-test-utils = { workspace = true }
eyre = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions crates/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pub mod deploy_helpers;
pub mod execution_helpers;
pub mod fixtures;
pub mod hive_utils;
pub mod rpc_helpers;
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ use std::net::SocketAddr;
use std::sync::Arc;

use jsonrpsee::server::ServerHandle;
use kakarot_rpc::config::RPCConfig;
use kakarot_rpc::rpc::KakarotRpcModuleBuilder;
use kakarot_rpc::run_server;
use kakarot_rpc_core::client::api::KakarotStarknetApi;
use kakarot_rpc_core::client::config::{Network, StarknetConfig};
use kakarot_rpc_core::client::KakarotClient;
use kakarot_test_utils::deploy_helpers::KakarotTestEnvironmentContext;
use starknet::providers::jsonrpc::HttpTransport;
use starknet::providers::JsonRpcClient;

use crate::config::RPCConfig;
use crate::rpc::KakarotRpcModuleBuilder;
use crate::run_server;
use crate::deploy_helpers::KakarotTestEnvironmentContext;

/// Sets up the environment for Kakarot RPC integration tests by deploying the Kakarot contracts
/// and starting the Kakarot RPC server.
Expand Down

0 comments on commit a895199

Please sign in to comment.