Skip to content

Commit

Permalink
added zcash-local-net and new test_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
idky137 committed Nov 26, 2024
1 parent a43cf19 commit 1fe53bc
Show file tree
Hide file tree
Showing 7 changed files with 567 additions and 214 deletions.
166 changes: 15 additions & 151 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ zebra-chain = { git = "https://github.com/ZcashFoundation/zebra.git", rev = "4eb
zebra-rpc = { git = "https://github.com/ZcashFoundation/zebra.git", rev = "4eb285de50848f1a4dcebd0fbe353e4f150fd371" }

# Zcash-Local-Net
zcash_local_net = { git = "https://github.com/zingolabs/zcash-local-net.git", branch = "dev", features = [ "test_fixtures" ] }
zcash_local_net = { git = "https://github.com/idky137/zcash-local-net.git", branch = "make_indexer_optional", features = [ "test_fixtures" ] }


# Miscellaneous
tokio = { version = "1.38", features = ["full"] }
Expand Down
3 changes: 0 additions & 3 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ tokio = { workspace = true }

# Logging
tracing-subscriber = { workspace = true }

# Lazy
once_cell = { workspace = true }
30 changes: 1 addition & 29 deletions integration-tests/tests/client_rpcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,9 @@
//!
//! See `Testing` section of README.md for more details.

use std::path::PathBuf;

use once_cell::sync::Lazy;
use zaino_testutils::{LIGHTWALLETD_BIN, ZAINOD_BIN, ZCASHD_BIN, ZCASH_CLI_BIN, ZEBRAD_BIN};
use zcash_local_net::network::Network;

static ZCASHD_BIN: Lazy<Option<PathBuf>> = Lazy::new(|| {
let mut workspace_root_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
workspace_root_path.pop();
Some(workspace_root_path.join("test_binaries/bins/zcashd"))
});
static ZCASH_CLI_BIN: Lazy<Option<PathBuf>> = Lazy::new(|| {
let mut workspace_root_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
workspace_root_path.pop();
Some(workspace_root_path.join("test_binaries/bins/zcash-cli"))
});
static ZEBRAD_BIN: Lazy<Option<PathBuf>> = Lazy::new(|| {
let mut workspace_root_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
workspace_root_path.pop();
Some(workspace_root_path.join("test_binaries/bins/zebrad"))
});
static LIGHTWALLETD_BIN: Lazy<Option<PathBuf>> = Lazy::new(|| {
let mut workspace_root_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
workspace_root_path.pop();
Some(workspace_root_path.join("test_binaries/bins/lightwalletd"))
});
static ZAINOD_BIN: Lazy<Option<PathBuf>> = Lazy::new(|| {
let mut workspace_root_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
workspace_root_path.pop();
Some(workspace_root_path.join("target/release/zainod"))
});

#[ignore = "not a test. generates chain cache for client_rpc tests."]
#[tokio::test]
async fn generate_zcashd_chain_cache() {
Expand Down
13 changes: 10 additions & 3 deletions zaino-testutils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,22 @@ test_fixtures = []
zaino-fetch = { path = "../zaino-fetch" }
zainod = { path = "../zainod" }

# Librustzcash
zcash_protocol = { workspace = true }

# ZingoLib
zingolib = { workspace = true }

# Miscellaneous Workspace
# Test Utilities
zcash_local_net = { workspace = true, features = ["test_fixtures"] }

# Miscellaneous
tokio = { workspace = true }
tonic = { workspace = true }
http = { workspace = true }

# Miscellaneous Crate
ctrlc = { workspace = true }
tempfile = { workspace = true }
portpicker = { workspace = true }
tracing-subscriber = { workspace = true }
once_cell = { workspace = true }

Loading

0 comments on commit 1fe53bc

Please sign in to comment.