wasmCloud/wadm

[BUG] flake due to dependency on download

ricochet opened this issue · 2 comments

This is an integration test that's flaky in CI and for first-time users.

Steps to reproduce:

# clear downloads
rm -rf ~/.wash/downloads
cargo test --package wadm-cli --test command_worker_integration -- test_annotation_stop --exact --show-output

The error, if the test flakes, will be:

 ---- test_annotation_stop stdout ----
thread 'test_annotation_stop' panicked at tests/helpers.rs:120:37:
Unable to run detached wash up: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error stopping wasmcloud host: No such file or directory (os error 2)

This is from the host download taking time to download.

Where possible we should avoid downloads including in integration tests. But if we need to stage a pipeline to run more e2e style tests, then the integration tests should be staged prior to triggering them like with a setup action in CI.

A little more research and I think this might be a good case for a wasmCloud testcontainer.

I'd be happy to take a pass at putting testcontainerizing this one, I've got some experience in working with them in other parts of the wasmcloud project, so it should be pretty manageable to transfer that over to wadm as well