From 5b31375b78b02db08378e99cdb99b3efd0ebc5e5 Mon Sep 17 00:00:00 2001 From: nicolas <48695862+merklefruit@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:28:45 +0200 Subject: [PATCH] chore: rm unused tests --- bolt-cli/src/common/bolt_manager.rs | 61 ----------------------------- 1 file changed, 61 deletions(-) diff --git a/bolt-cli/src/common/bolt_manager.rs b/bolt-cli/src/common/bolt_manager.rs index ae4e0a720..261347ab3 100644 --- a/bolt-cli/src/common/bolt_manager.rs +++ b/bolt-cli/src/common/bolt_manager.rs @@ -94,64 +94,3 @@ sol! { error ValidatorDoesNotExist(); } } - -#[cfg(test)] -mod tests { - use std::str::FromStr; - - use alloy::primitives::U256; - - use super::*; - - #[tokio::test] - async fn test_get_operators_helder() -> eyre::Result<()> { - let registry = BoltManager::new( - Url::parse("http://remotebeast:4485")?, - Address::from_str("0xdF11D829eeC4C192774F3Ec171D822f6Cb4C14d9")?, - ); - - let sample_pubkey = B256::from_str("0xsamplepubkeyhash").expect("invalid pubkey"); - - let registrant = registry.get_proposer_status(sample_pubkey).await; - assert!(matches!(registrant, Ok(None))); - - let invalid_pubkey = B256::from_str("0xinvalidsamplepubkeyhash").expect("invalid pubkey"); - let registrant = match registry.get_proposer_status(invalid_pubkey).await { - Ok(Some(registrant)) => registrant, - e => panic!("unexpected error reading from registry: {:?}", e), - }; - - let expected = ProposerStatus { - pubkeyHash: sample_pubkey, - active: true, - operator: Address::from_str("0xad3cd1b81c80f4a495d6552ae6423508492a27f8")?, - operatorRPC: "http://sampleoperatorrpc:8000".to_string(), - collaterals: vec![Address::from_str("0xsamplecollateral1")?], - amounts: vec![U256::from(10000000000000000000u128)], - }; - - assert_eq!(registrant.pubkeyHash, expected.pubkeyHash); - assert_eq!(registrant.active, expected.active); - assert_eq!(registrant.operator, expected.operator); - assert_eq!(registrant.operatorRPC, expected.operatorRPC); - assert_eq!(registrant.collaterals, expected.collaterals); - assert_eq!(registrant.amounts, expected.amounts); - - Ok(()) - } - - #[tokio::test] - async fn test_check_validator_helder() -> eyre::Result<()> { - let registry = BoltManager::new( - Url::parse("http://remotebeast:48545")?, - Address::from_str("0xdF11D829eeC4C192774F3Ec171D822f6Cb4C14d9")?, - ); - - let pubkey_hash = B256::from_str("0xsamplepubkeyhash").expect("invalid pubkey"); - let registrant = registry.get_sidecar_rpc_url_for_validator(pubkey_hash).await?; - assert!(registrant.is_some()); - - dbg!(®istrant); - Ok(()) - } -}