Skip to content

Commit

Permalink
Merge pull request #189 from rylev/factors
Browse files Browse the repository at this point in the history
Update to latest Spin version with Factors
  • Loading branch information
Mossaka authored Oct 9, 2024
2 parents 7db3db7 + 6919450 commit 10e5292
Show file tree
Hide file tree
Showing 12 changed files with 1,775 additions and 9,923 deletions.
3,512 changes: 1,648 additions & 1,864 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions conformance-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "conformance-tests"
name = "shim-conformance-tests"
version.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -9,7 +9,7 @@ homepage.workspace = true

[dependencies]
anyhow = "1.0"
conformance-tests = { git = "https://github.com/fermyon/conformance-tests", ref = "db0ee32a825561d35f884a246e1d390134d78823" }
conformance-tests = { git = "https://github.com/fermyon/conformance-tests", rev = "6ec9e9d95e3b333de85685131337c8864c1af67d" }
log = "0.4"
nix = "0.28"
test-environment = { git = "https://github.com/fermyon/conformance-tests", ref = "db0ee32a825561d35f884a246e1d390134d78823" }
nix = { version = "0.29", features = ["signal", "process"] }
test-environment = { git = "https://github.com/fermyon/conformance-tests", rev = "6ec9e9d95e3b333de85685131337c8864c1af67d" }
17 changes: 12 additions & 5 deletions conformance-tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ fn main() {
.next()
.expect("expected second arg to be path to ctr binary")
.into();
conformance_tests::run_tests(move |test| run_test(test, &spin_binary, &ctr_binary)).unwrap();
let config = conformance_tests::Config::new("canary");
conformance_tests::run_tests(config, move |test| {
run_test(test, &spin_binary, &ctr_binary)
})
.unwrap();
}

fn run_test(
Expand All @@ -31,23 +35,26 @@ fn run_test(
ctr_binary: &std::path::Path,
) -> anyhow::Result<()> {
println!("running test: {}", test.name);
let mut services = vec!["registry".into()];
let mut services = vec!["registry"];
for precondition in &test.config.preconditions {
match precondition {
conformance_tests::config::Precondition::HttpEcho => {
services.push("http-echo".into());
services.push("http-echo");
}
conformance_tests::config::Precondition::KeyValueStore(k) => {
if k.label != "default" {
panic!("unsupported label: {}", k.label);
}
}
conformance_tests::config::Precondition::TcpEcho => {
services.push("tcp-echo".into());
services.push("tcp-echo");
}
conformance_tests::config::Precondition::Sqlite => {}
conformance_tests::config::Precondition::Redis => {
services.push("redis".into());
services.push("redis");
}
conformance_tests::config::Precondition::Mqtt => {
services.push("mqtt");
}
}
}
Expand Down
Loading

0 comments on commit 10e5292

Please sign in to comment.