Skip to content

Commit

Permalink
Fixes cargo check annotations on Windows (#8738)
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 authored Aug 3, 2024
1 parent e56ee4c commit 7ee9e2b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
2 changes: 2 additions & 0 deletions zebra-network/src/peer_set/initialize/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ use tokio::{io::AsyncWriteExt, net::TcpStream, task::JoinHandle};
use tower::{service_fn, Layer, Service, ServiceExt};

use zebra_chain::{chain_tip::NoChainTip, parameters::Network, serialization::DateTime32};

#[cfg(not(target_os = "windows"))]
use zebra_test::net::random_known_port;

use crate::{
Expand Down
11 changes: 9 additions & 2 deletions zebra-scan/tests/scanner.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
//! `zebra-scanner` binary tests.

use std::path::Path;

#[cfg(not(target_os = "windows"))]
use std::io::Write;

use tempfile::TempDir;

use zebra_grpc::scanner::{scanner_client::ScannerClient, Empty};
use zebra_test::{
args,
command::{Arguments, TestDirExt},
prelude::*,
};

use std::{io::Write, path::Path};
#[cfg(not(target_os = "windows"))]
use zebra_grpc::scanner::{scanner_client::ScannerClient, Empty};

mod scan_task_commands;

/// The extended Sapling viewing key of [ZECpages](https://zecpages.com/boardinfo)
#[cfg(not(target_os = "windows"))]
const ZECPAGES_SAPLING_VIEWING_KEY: &str = "zxviews1q0duytgcqqqqpqre26wkl45gvwwwd706xw608hucmvfalr759ejwf7qshjf5r9aa7323zulvz6plhttp5mltqcgs9t039cx2d09mgq05ts63n8u35hyv6h9nc9ctqqtue2u7cer2mqegunuulq2luhq3ywjcz35yyljewa4mgkgjzyfwh6fr6jd0dzd44ghk0nxdv2hnv4j5nxfwv24rwdmgllhe0p8568sgqt9ckt02v2kxf5ahtql6s0ltjpkckw8gtymxtxuu9gcr0swvz";

/// Test the scanner binary with the `--help` flag.
Expand Down
15 changes: 8 additions & 7 deletions zebra-state/src/service/non_finalized_state/tests/prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use zebra_test::prelude::*;
use zebra_chain::{
amount::NonNegative,
block::{self, arbitrary::allow_all_transparent_coinbase_spends, Block, Height},
fmt::DisplayToDebug,
history_tree::{HistoryTree, NonEmptyHistoryTree},
parameters::NetworkUpgrade::*,
parameters::*,
Expand All @@ -18,12 +17,7 @@ use zebra_chain::{
use crate::{
arbitrary::Prepare,
request::ContextuallyVerifiedBlock,
service::{
arbitrary::PreparedChain,
finalized_state::FinalizedState,
non_finalized_state::{Chain, NonFinalizedState},
},
Config,
service::{arbitrary::PreparedChain, non_finalized_state::Chain},
};

/// The default number of proptest cases for long partial chain tests.
Expand Down Expand Up @@ -453,6 +447,13 @@ fn finalized_equals_pushed_history_tree() -> Result<()> {
#[test]
#[cfg(not(target_os = "windows"))]
fn rejection_restores_internal_state_genesis() -> Result<()> {
use zebra_chain::fmt::DisplayToDebug;

use crate::{
service::{finalized_state::FinalizedState, non_finalized_state::NonFinalizedState},
Config,
};

let _init_guard = zebra_test::init();

proptest!(ProptestConfig::with_cases(env::var("PROPTEST_CASES")
Expand Down
8 changes: 6 additions & 2 deletions zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,22 @@ use zebra_chain::{
parameters::Network::{self, *},
};
use zebra_consensus::ParameterCheckpoint;
use zebra_network::constants::PORT_IN_USE_ERROR;
use zebra_node_services::rpc_client::RpcRequestClient;
use zebra_rpc::server::OPENED_RPC_ENDPOINT_MSG;
use zebra_state::{constants::LOCK_FILE_ERROR, state_database_format_version_in_code};

#[cfg(not(target_os = "windows"))]
use zebra_network::constants::PORT_IN_USE_ERROR;

use zebra_test::{
args,
command::{to_regex::CollectRegexSet, ContextFrom},
net::random_known_port,
prelude::*,
};

#[cfg(not(target_os = "windows"))]
use zebra_test::net::random_known_port;

mod common;

use common::{
Expand Down

0 comments on commit 7ee9e2b

Please sign in to comment.