Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run conformance tests #2542

Merged
merged 9 commits into from
Jun 14, 2024
Merged

Run conformance tests #2542

merged 9 commits into from
Jun 14, 2024

Conversation

rylev
Copy link
Collaborator

@rylev rylev commented Jun 5, 2024

I've started creating a conformance testing suite in https://github.com/fermyon/conformance-tests. You can read more about the aim of the project in the README of the repo. In short, we are trying to create a set of tests that all Spin compliant runtimes are expected to pass.

We're currently not running these yet in CI, but that will come soon in a follow up.

cc @kate-goldenring for visibility

@rylev rylev marked this pull request as ready for review June 13, 2024 10:42
Comment on lines 11 to 21
let env_config = SpinCli::config(
spin_binary.clone(),
[],
move |e| {
e.copy_into(&test.manifest, "spin.toml")?;
e.copy_into(&test.component, test.component.file_name().unwrap())?;
Ok(())
},
test_environment::services::ServicesConfig::none(),
testing_framework::runtimes::SpinAppType::Http,
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe its just because I'm looking at this without the help of a IDE, but its a bit hard to understand what some of these args mean ([], the closure). Could/should this be a struct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've refactored the [] into a struct along wiht the spin_binary and SpinAppType since all of these have to do with how Spin is run. Giving a name to the closure has a less clear solution but hopefully with less args that's less of a problem 🤷 ?

tests/testing-framework/src/runtimes/in_process_spin.rs Outdated Show resolved Hide resolved
services_config,
create_runtime: Box::new(move |env| {
preboot(env)?;
SpinCli::start(&spin_binary, env, spin_up_args, app_type)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...yeah, like that 😄

Copy link
Contributor

@kate-goldenring kate-goldenring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to have all the services moved out of Spin into conformance-testing.

tests/testing-framework/src/runtimes/in_process_spin.rs Outdated Show resolved Hide resolved
Signed-off-by: Ryan Levick <[email protected]>
Signed-off-by: Ryan Levick <[email protected]>
@rylev rylev enabled auto-merge June 14, 2024 08:50
@rylev rylev merged commit aedc2b8 into main Jun 14, 2024
17 checks passed
@rylev rylev deleted the conformance-tests branch September 9, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants