Fix test_harness tests

They were broken by changes to TestingBeaconStateBuilder and where the
keypairs file is stored.
This commit is contained in:
Paul Hauner
2019-03-13 11:25:17 +11:00
parent 2d2ba6576b
commit 6c4e457c8a
4 changed files with 10 additions and 95 deletions

View File

@@ -1,6 +1,5 @@
use crate::test_case::TestCase;
use clap::ArgMatches;
use std::path::Path;
use std::{fs::File, io::prelude::*};
use yaml_rust::YamlLoader;
@@ -17,10 +16,6 @@ pub fn run_test(matches: &ArgMatches) {
};
for doc in &docs {
let validators_dir = matches
.value_of("validators_dir")
.and_then(|dir_str| Some(Path::new(dir_str)));
// For each `test_cases` YAML in the document, build a `TestCase`, execute it and
// assert that the execution result matches the test_case description.
//
@@ -35,7 +30,7 @@ pub fn run_test(matches: &ArgMatches) {
// panics with a message.
for test_case in doc["test_cases"].as_vec().unwrap() {
let test_case = TestCase::from_yaml(test_case);
test_case.assert_result_valid(test_case.execute(validators_dir))
test_case.assert_result_valid(test_case.execute())
}
}
}