ipfs-log icon indicating copy to clipboard operation
ipfs-log copied to clipboard

How to test ipfs-log against js-IPFS RCs

Open achingbrain opened this issue 4 years ago • 2 comments

In https://github.com/ipfs/js-ipfs/pull/2498 ipfs-log was added to the list of early tester projects - I'd like to get it running against js-IPFS release candidates in CI to get early feedback on any problems.

We use the aegir test-external command to do this - it clones a repo, does an install, runs the tests - if they pass it swaps any ipfs or ipfs-http-client deps for the release candidate version and runs the tests again.

The problem is this repo doesn't have a direct dependency on ipfs or ipfs-http-client so there's nothing to swap out, I think because it uses them via the orbit-db-test-utils module.

Would refactoring that library to take an IPFS module as an argument that could then be a dependency of this module be something you'd be interested in? That would guarantee that this module runs with a specific version of js-IPFS (as much as CI guarantees anything) instead of whatever version orbit-db-test-utils happened to be bundled with at the time.

achingbrain avatar Oct 22 '19 16:10 achingbrain

This is a pretty good question @achingbrain, and you are correct that the ipfs dependency lives in orbit-db-test-utils. Is it possible on your end to upgrade the dependency in that module and then test ipfs-log with it?

I ask because our plan is to eventually move the ipfs dependency inside orbit-db itself to orbit-db-test-utils as well

aphelionz avatar Oct 22 '19 16:10 aphelionz

We've talked about doing something like that, but it turns the testing environment into a sort of custom setup that begins to get hard to replicate.

It's much better to run only against direct dependencies - that way the code calling functions in the IPFS API also controls the version of the API it's using which makes everything a bit more predictable.

achingbrain avatar Oct 23 '19 15:10 achingbrain