Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

How to test ipfs-log against js-IPFS RCs #272

Open
achingbrain opened this issue Oct 22, 2019 · 2 comments
Open

How to test ipfs-log against js-IPFS RCs #272

achingbrain opened this issue Oct 22, 2019 · 2 comments

Comments

@achingbrain
Copy link

In ipfs/js-ipfs#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 achingbrain changed the title How to test ipfs-log against js-IPFS rcs How to test ipfs-log against js-IPFS RCs Oct 22, 2019
@aphelionz
Copy link
Contributor

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

@achingbrain
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants