-
Notifications
You must be signed in to change notification settings - Fork 265
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
Move more integration tests to use the testing framework #2228
Conversation
Signed-off-by: Ryan Levick <[email protected]>
Signed-off-by: Ryan Levick <[email protected]>
Signed-off-by: Ryan Levick <[email protected]>
Signed-off-by: Ryan Levick <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. I'm having trouble seeing where the wasi_snapshot_preview1.reactor.wasm
files for the rc-2023-11-10
and rc-2023-12-05
tests are passed to wit-component
now that the code previously responsible for that has been removed from build.rs
. Is there a new way that's done which I'm missing?
Signed-off-by: Ryan Levick <[email protected]>
@dicej I was about to write how this is indeed supported, but then I realized I was missing one change to support In general, running test components through adapters is supported. The test components repository which supplies the test components used in runtime and e2e testing has support for running the test component through an adapter when it gets built. This happens in the test-components crate's build.rs. I'm not 100% happy with how this mechanism works since it requires adding adapters to an allow list, but I am overall really happy that it's trivial to add new adapters and have components run through them. We can tweak this mechanism over time though. |
Signed-off-by: Ryan Levick <[email protected]>
…nup_tests Signed-off-by: Ryan Levick <[email protected]>
Signed-off-by: Ryan Levick <[email protected]>
This PR moves more tests over to using the testing frameworks. By and large this is mostly just deleting code that isn't used any more because the testing framework takes care of this.
I would suggest looking at
tests/spinup_tests.rs
for the most relevant changes.cc @dicej who has authored some of these integration tests. As an example of the change that's happening here, the following is the code that is needed for setting up and executing a wasi-http integration test:
If a new wasi-http test is to be added, the app just needs to be added to the test components repository (where it will be automatically built and run through the appropriate adapter) and then the following test needs to be added: