Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable phase2 tests that require external files #1342

Merged
merged 2 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions phase2/tests/large.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ use rand::thread_rng;

use mimc::{mimc as mimc_hash, MiMCDemo, MIMC_ROUNDS};

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[test]
#[ignore]
fn test_large_params() {
//test_large_params_inner()
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[allow(dead_code)]
fn test_large_params_inner() {
assert!(
Path::new("./phase1radix2m10").exists(),
"the phase1 file `phase1radix2m10` must be in the crate's top level directory"
Expand Down
22 changes: 16 additions & 6 deletions phase2/tests/small.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ use rand_chacha::ChaChaRng;

use mimc::{mimc as mimc_hash, MiMCDemo, MIMC_ROUNDS};

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[test]
#[ignore]
fn test_mimc_small_params() {
//test_mimc_small_params_inner()
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[allow(dead_code)]
fn test_mimc_small_params_inner() {
assert!(
Path::new("./phase1radix2m10").exists(),
"the phase1 file `phase1radix2m10` must be in the crate's top level directory"
Expand Down Expand Up @@ -157,12 +162,17 @@ fn test_mimc_small_params() {
assert!(verify_proof(&pvk, &proof, &[image]).unwrap());
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[test]
#[ignore]
fn test_small_file_io() {
//test_small_file_io_inner()
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[allow(dead_code)]
fn test_small_file_io_inner() {
const LARGE_PATH: &str = "./tests/large_params";
const SMALL_PATH: &str = "./tests/small_params";

Expand Down