From 558661a531d2c7dc86fd630942763faa2c2b540e Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Sat, 21 Nov 2020 01:37:43 -0500 Subject: [PATCH] Remove test attributes and allow(dead_code) for test code that tests currently unimplemented functionality --- .github/workflows/test.yml | 2 +- zebra-consensus/src/block/tests.rs | 6 ++++-- zebra-consensus/src/checkpoint/tests.rs | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9eb7ae67..e4d0aac5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,7 @@ jobs: - name: Run all tests run: | gcloud compute ssh "zebrad-tests-$BRANCH_NAME-$SHORT_SHA" --zone "$ZONE" \ - --command "git clone -b $BRANCH_NAME https://github.com/ZcashFoundation/zebra.git; cd zebra/; docker build -f docker/Dockerfile.test -t zebrad-test .; docker run -i zebrad-test cargo test --workspace --no-fail-fast -- -Zunstable-options --include-ignored --skip kill_on_timeout" + --command "git clone -b $BRANCH_NAME https://github.com/ZcashFoundation/zebra.git; cd zebra/; docker build -f docker/Dockerfile.test -t zebrad-test .; docker run -i zebrad-test cargo test --workspace --no-fail-fast -- -Zunstable-options --include-ignored" # Clean up - name: Delete test instance diff --git a/zebra-consensus/src/block/tests.rs b/zebra-consensus/src/block/tests.rs index 82c8c0d1..11c724d6 100644 --- a/zebra-consensus/src/block/tests.rs +++ b/zebra-consensus/src/block/tests.rs @@ -102,13 +102,15 @@ static INVALID_COINBASE_TRANSCRIPT: Lazy, Result Result<(), Report> { check_transcripts().await } +#[allow(dead_code)] #[spandoc::spandoc] async fn check_transcripts() -> Result<(), Report> { zebra_test::init(); diff --git a/zebra-consensus/src/checkpoint/tests.rs b/zebra-consensus/src/checkpoint/tests.rs index 4b8eb803..535d9461 100644 --- a/zebra-consensus/src/checkpoint/tests.rs +++ b/zebra-consensus/src/checkpoint/tests.rs @@ -213,9 +213,9 @@ async fn multi_item_checkpoint_list() -> Result<(), Report> { Ok(()) } -#[tokio::test] // Temporarily ignore this test, until the state can handle out-of-order blocks -#[ignore] +// #[tokio::test] +#[allow(dead_code)] async fn continuous_blockchain_test() -> Result<(), Report> { continuous_blockchain(None).await?; for height in 0..=10 { @@ -225,6 +225,8 @@ async fn continuous_blockchain_test() -> Result<(), Report> { } /// Test a continuous blockchain, restarting verification at `restart_height`. +// TODO: does this duplicate the test code commented out in src/chain/tests.rs? +#[allow(dead_code)] #[spandoc::spandoc] async fn continuous_blockchain(restart_height: Option) -> Result<(), Report> { zebra_test::init();