Skip to content

Commit

Permalink
Merge pull request #2872 from itowlson/fix-runtime-test-failures-bein…
Browse files Browse the repository at this point in the history
…g-buried

Fix for failing runtime tests not failing the test suite
  • Loading branch information
rylev authored Oct 9, 2024
2 parents e32139c + 9369af5 commit ac0414b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ members = [
anyhow = "1"
async-trait = "0.1"
bytes = "1"
conformance-tests = { git = "https://github.com/fermyon/conformance-tests", rev = "387b7f375df59e6254a7c29cf4a53507a9f46d32" }
conformance-tests = { git = "https://github.com/fermyon/conformance-tests", rev = "ecd22a45bcc5c775a56c67689a89aa4005866ac0" }
dirs = "5.0"
futures = "0.3"
glob = "0.3"
Expand All @@ -139,7 +139,7 @@ serde = { version = "1", features = ["derive", "rc"] }
serde_json = "1.0"
sha2 = "0.10"
tempfile = "3"
test-environment = { git = "https://github.com/fermyon/conformance-tests", rev = "387b7f375df59e6254a7c29cf4a53507a9f46d32" }
test-environment = { git = "https://github.com/fermyon/conformance-tests", rev = "ecd22a45bcc5c775a56c67689a89aa4005866ac0" }
thiserror = "1"
tokio = "1"
toml = "0.8"
Expand Down
6 changes: 4 additions & 2 deletions tests/conformance-tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ fn main() {
.nth(1)
.expect("expected first argument to be path to spin binary")
.into();
conformance_tests::run_tests("canary", move |test| {
let config = conformance_tests::Config::new("canary");
conformance_tests::run_tests(config, move |test| {
conformance::run_test(test, &spin_binary)
})
.unwrap();
.unwrap()
.exit();
}
12 changes: 8 additions & 4 deletions tests/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ mod runtime_tests {
}

#[test]
fn conformance_tests() {
conformance_tests::run_tests("canary", move |test| {
fn conformance_tests() -> anyhow::Result<()> {
let config = conformance_tests::Config::new("canary");
let conclusion = conformance_tests::run_tests(config, move |test| {
conformance::run_test(test, &spin_binary())
})
.unwrap();
})?;
if conclusion.has_failed() {
anyhow::bail!("One or more errors occurred in the conformance tests");
}
Ok(())
}

fn spin_binary() -> PathBuf {
Expand Down

0 comments on commit ac0414b

Please sign in to comment.