-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable MBT tests if the "mocks" feature is not enabled (#643)
* Add structure to MBT * Only run model_based test if mocks feature is enabled * Remove model_based test from the executor * update CHANGELOG
- Loading branch information
1 parent
ca33863
commit 1b80bc7
Showing
7 changed files
with
32 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
mod executor; | ||
|
||
const TESTS_DIR: &str = "tests/support/model_based/tests"; | ||
|
||
#[test] | ||
fn mbt() { | ||
let tests = vec!["ICS02UpdateOKTest", "ICS02HeaderVerificationFailureTest"]; | ||
|
||
for test in tests { | ||
let test = format!("{}/{}.json", TESTS_DIR, test); | ||
let executor = executor::IBCTestExecutor::new(); | ||
// we should be able to just return the `Result` once the following issue | ||
// is fixed: https://github.com/rust-lang/rust/issues/43301 | ||
if let Err(e) = executor::modelator::test(&test, executor) { | ||
panic!("{:?}", e); | ||
} | ||
} | ||
} |