Move local_cluster tests into own crate (#5465)
This commit is contained in:
parent
eaf1b91148
commit
238aa2133d
|
@ -3114,6 +3114,7 @@ dependencies = [
|
|||
"solana-drone 0.18.0-pre1",
|
||||
"solana-exchange-api 0.18.0-pre1",
|
||||
"solana-exchange-program 0.18.0-pre1",
|
||||
"solana-local-cluster 0.18.0-pre1",
|
||||
"solana-logger 0.18.0-pre1",
|
||||
"solana-metrics 0.18.0-pre1",
|
||||
"solana-netutil 0.18.0-pre1",
|
||||
|
@ -3149,6 +3150,7 @@ dependencies = [
|
|||
"solana-client 0.18.0-pre1",
|
||||
"solana-drone 0.18.0-pre1",
|
||||
"solana-librapay-api 0.18.0-pre1",
|
||||
"solana-local-cluster 0.18.0-pre1",
|
||||
"solana-logger 0.18.0-pre1",
|
||||
"solana-measure 0.18.0-pre1",
|
||||
"solana-metrics 0.18.0-pre1",
|
||||
|
@ -3482,6 +3484,25 @@ dependencies = [
|
|||
"solana_libra_types 0.0.0-sol15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-local-cluster"
|
||||
version = "0.18.0-pre1"
|
||||
dependencies = [
|
||||
"hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serial_test 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serial_test_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.18.0-pre1",
|
||||
"solana-client 0.18.0-pre1",
|
||||
"solana-logger 0.18.0-pre1",
|
||||
"solana-runtime 0.18.0-pre1",
|
||||
"solana-sdk 0.18.0-pre1",
|
||||
"solana-stake-api 0.18.0-pre1",
|
||||
"solana-storage-api 0.18.0-pre1",
|
||||
"solana-storage-program 0.18.0-pre1",
|
||||
"solana-vote-api 0.18.0-pre1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-logger"
|
||||
version = "0.18.0-pre1"
|
||||
|
|
|
@ -15,6 +15,7 @@ members = [
|
|||
"keygen",
|
||||
"kvstore",
|
||||
"ledger-tool",
|
||||
"local_cluster",
|
||||
"logger",
|
||||
"merkle-tree",
|
||||
"measure",
|
||||
|
|
|
@ -25,6 +25,7 @@ serde_json = "1.0.40"
|
|||
serde_yaml = "0.8.9"
|
||||
# solana-runtime = { path = "../solana/runtime"}
|
||||
solana = { path = "../core", version = "0.18.0-pre1" }
|
||||
solana-local-cluster = { path = "../local_cluster", version = "0.18.0-pre1" }
|
||||
solana-client = { path = "../client", version = "0.18.0-pre1" }
|
||||
solana-drone = { path = "../drone", version = "0.18.0-pre1" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.18.0-pre1" }
|
||||
|
|
|
@ -964,10 +964,10 @@ pub fn airdrop_lamports(client: &Client, drone_addr: &SocketAddr, id: &Keypair,
|
|||
mod tests {
|
||||
use super::*;
|
||||
use solana::gossip_service::{discover_cluster, get_multi_client};
|
||||
use solana::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana::validator::ValidatorConfig;
|
||||
use solana_drone::drone::run_local_drone;
|
||||
use solana_exchange_api::exchange_processor::process_instruction;
|
||||
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana_runtime::bank::Bank;
|
||||
use solana_runtime::bank_client::BankClient;
|
||||
use solana_sdk::genesis_block::create_genesis_block;
|
||||
|
|
|
@ -17,6 +17,7 @@ serde_derive = "1.0.98"
|
|||
serde_json = "1.0.40"
|
||||
serde_yaml = "0.8.9"
|
||||
solana = { path = "../core", version = "0.18.0-pre1" }
|
||||
solana-local-cluster = { path = "../local_cluster", version = "0.18.0-pre1" }
|
||||
solana-client = { path = "../client", version = "0.18.0-pre1" }
|
||||
solana-drone = { path = "../drone", version = "0.18.0-pre1" }
|
||||
solana-librapay-api = { path = "../programs/librapay_api", version = "0.18.0-pre1" }
|
||||
|
|
|
@ -935,10 +935,10 @@ mod tests {
|
|||
|
||||
use super::*;
|
||||
use solana::cluster_info::FULLNODE_PORT_RANGE;
|
||||
use solana::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana::validator::ValidatorConfig;
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_drone::drone::run_local_drone;
|
||||
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana_runtime::bank::Bank;
|
||||
use solana_runtime::bank_client::BankClient;
|
||||
use solana_sdk::client::SyncClient;
|
||||
|
|
|
@ -43,7 +43,6 @@ pub mod leader_schedule;
|
|||
pub mod leader_schedule_cache;
|
||||
pub mod leader_schedule_utils;
|
||||
pub mod ledger_cleanup_service;
|
||||
pub mod local_cluster;
|
||||
pub mod local_vote_signer_service;
|
||||
pub mod packet;
|
||||
pub mod poh;
|
||||
|
@ -80,7 +79,6 @@ pub mod window_service;
|
|||
#[macro_use]
|
||||
extern crate solana_budget_program;
|
||||
|
||||
#[macro_use]
|
||||
extern crate solana_storage_program;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/target/
|
||||
/farf/
|
|
@ -0,0 +1,30 @@
|
|||
[package]
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-local-cluster"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.18.0-pre1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana = { path = "../core", version = "0.18.0-pre1" }
|
||||
solana-client = { path = "../client", version = "0.18.0-pre1" }
|
||||
solana-logger = { path = "../logger", version = "0.18.0-pre1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.18.0-pre1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.18.0-pre1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.18.0-pre1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.18.0-pre1" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.18.0-pre1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.18.0-pre1" }
|
||||
|
||||
[dev-dependencies]
|
||||
hashbrown = "0.5.0"
|
||||
serial_test = "0.2.0"
|
||||
serial_test_derive = "0.2.0"
|
||||
|
||||
[features]
|
||||
cuda = ["solana/cuda"]
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
pub mod local_cluster;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[macro_use]
|
||||
extern crate solana;
|
||||
|
||||
#[macro_use]
|
||||
extern crate solana_storage_program;
|
|
@ -1,12 +1,12 @@
|
|||
use crate::blocktree::create_new_tmp_ledger;
|
||||
use crate::cluster::Cluster;
|
||||
use crate::cluster_info::{Node, FULLNODE_PORT_RANGE};
|
||||
use crate::contact_info::ContactInfo;
|
||||
use crate::genesis_utils::{create_genesis_block_with_leader, GenesisBlockInfo};
|
||||
use crate::gossip_service::discover_cluster;
|
||||
use crate::replicator::Replicator;
|
||||
use crate::service::Service;
|
||||
use crate::validator::{Validator, ValidatorConfig};
|
||||
use solana::blocktree::create_new_tmp_ledger;
|
||||
use solana::cluster::Cluster;
|
||||
use solana::cluster_info::{Node, FULLNODE_PORT_RANGE};
|
||||
use solana::contact_info::ContactInfo;
|
||||
use solana::genesis_utils::{create_genesis_block_with_leader, GenesisBlockInfo};
|
||||
use solana::gossip_service::discover_cluster;
|
||||
use solana::replicator::Replicator;
|
||||
use solana::service::Service;
|
||||
use solana::validator::{Validator, ValidatorConfig};
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_client::thin_client::ThinClient;
|
||||
use solana_sdk::client::SyncClient;
|
||||
|
@ -581,7 +581,7 @@ impl Drop for LocalCluster {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::storage_stage::SLOTS_PER_TURN_TEST;
|
||||
use solana::storage_stage::SLOTS_PER_TURN_TEST;
|
||||
use solana_runtime::epoch_schedule::MINIMUM_SLOTS_PER_EPOCH;
|
||||
|
||||
#[test]
|
|
@ -8,8 +8,8 @@ use solana::broadcast_stage::BroadcastStageType;
|
|||
use solana::cluster::Cluster;
|
||||
use solana::cluster_tests;
|
||||
use solana::gossip_service::discover_cluster;
|
||||
use solana::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana::validator::ValidatorConfig;
|
||||
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana_runtime::epoch_schedule::{EpochSchedule, MINIMUM_SLOTS_PER_EPOCH};
|
||||
use solana_sdk::client::SyncClient;
|
||||
use solana_sdk::poh_config::PohConfig;
|
|
@ -9,11 +9,11 @@ use solana::blocktree::{create_new_tmp_ledger, get_tmp_ledger_path, Blocktree};
|
|||
use solana::cluster_info::{ClusterInfo, Node, FULLNODE_PORT_RANGE};
|
||||
use solana::contact_info::ContactInfo;
|
||||
use solana::gossip_service::discover_cluster;
|
||||
use solana::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana::replicator::Replicator;
|
||||
use solana::storage_stage::SLOTS_PER_TURN_TEST;
|
||||
use solana::validator::ValidatorConfig;
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_local_cluster::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana_sdk::genesis_block::create_genesis_block;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use std::fs::remove_dir_all;
|
Loading…
Reference in New Issue