Update CI to load current Kubo and run loopback tests
erikmav opened this issue · 3 comments
The current TestFixture.Ipfs
implementation for running unit tests currently just creates an IpfsClient
instance with the assumption of an IPFS local server to connect to. Update the test code to:
- Download latest Kubo and run locally in loopback mode.
- Ensure Kubo's storage is in a fresh directory for each test for cleanliness. This may imply stopping and starting the server between each test. Consider using https://github.com/microsoft/CopyOnWrite/blob/main/tests/utils/DisposableTempDirectory.cs for easy unique dir create and cleanup for each test.
- Validate this runs successfully in CI on GitHub Actions VMs.
Note this item will probably illuminate a lot of missing or out of date functionality. File incompatibilities as new issues.
@Arlodotexe possible to add me as a contributor on this repo to be able to run CI? Also on IpfsCore as both repos need simultaneous updating.
This part of Richard's tests always bothered me a bit. I noticed this the first time I ported his code over. It wasn't a simple fix, so I moved on and worked on developing tooling to make this easier.
I'm actually using that tooling in my own apps and unit tests, dogfooding it. Specifically, we'll want to make use of KuboDownloader
and KuboBootstrapper
if there's no HTTP API already running.
Note If our test project takes this new dependency, Arlodotexe/OwlCore.Kubo#3 gets a priority bump, but isn't required to close this ticket.
To give an update on this.
We're still doing various API cleanup to get us aligned with the most recent version of Kubo. Until we've finished fixing all remaining discrepancies, our unit tests won't fully pass.
When we've made more progress, we'll get Kubo bootstrapped and running as part of the tests, and run it in the CI.