Skip to content

Commit 70cad6e

Browse files
rylevkate-goldenring
authored andcommitted
Update conformance tests
Signed-off-by: Ryan Levick <[email protected]>
1 parent ace7195 commit 70cad6e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

conformance-tests/src/main.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,26 @@ fn main() {
2323

2424
'test: for test in conformance_tests::tests(&tests_dir).unwrap() {
2525
println!("running test: {}", test.name);
26+
let mut services = Vec::new();
27+
for precondition in &test.config.preconditions {
28+
match precondition {
29+
conformance_tests::config::Precondition::HttpEcho => {
30+
services.push("http-echo".into());
31+
}
32+
conformance_tests::config::Precondition::KeyValueStore(k) => {
33+
if k.label != "default" {
34+
panic!("unsupported label: {}", k.label);
35+
}
36+
}
37+
}
38+
}
2639
// Just using TTL.sh until we decide where to host these (local registry, ghcr, etc)
2740
let oci_image = format!("ttl.sh/{}:72h", test.name);
2841
let env_config = SpinShim::config(
2942
ctr_binary.into(),
3043
spin_binary.into(),
3144
oci_image.clone(),
32-
test_environment::services::ServicesConfig::new(test.config.services).unwrap(),
45+
test_environment::services::ServicesConfig::new(services).unwrap(),
3346
);
3447
let mut env = TestEnvironment::up(env_config, move |e| {
3548
let mut manifest =

0 commit comments

Comments
 (0)