• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ipfs/interop: Interoperability tests for IPFS Implementations (on-the-wire inter ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ipfs/interop

开源软件地址:

https://github.com/ipfs/interop

开源编程语言:

JavaScript 98.2%

开源软件介绍:

Interoperability Tests for IPFS

standard-readme compliant Travis CI

Interoperability tests for IPFS Implementations

This repository will be used for interop tests. Please jump into the issues if you'd like to help out setting this up!

Usage

Install

$ npm install -g ipfs-interop

Run the tests

$ ipfs-interop

Run a particular test locally

$ node bin/ipfs-interop.js -- -t node --grep {substring-test-name}

Testing with different versions of go/js IPFS

As a project

This module declares peer dependencies of ipfs, ipfs-http-client and go-ipfs so if you have ipfs-interop as a dependecy of your project, simply add the extra IPFS dependencies:

{
  "name": "my-project",
  "scripts": {
    "interop": "ipfs-interop"
  },
  "dependencies": {
    "go-ipfs": "...",
    "ipfs": "...",
    "ipfs-http-client": "...",
    "ipfs-interop": "..."
  }
}

Then run:

$ npm run interop

As environmental variables

Specify the following environmental variables to control which versions of IPFS ipfs-interop uses when installed globally:

  • IPFS_GO_EXEC A path to a go-IPFS binary
  • IPFS_JS_EXEC A path to /src/cli.js inside a js-IPFS install
  • IPFS_JS_MODULE A path to a js-IPFS install
  • IPFS_JS_HTTP_MODULE A path to a ipfs-http-client install (optional)

Then run:

$ npm install -g ipfs-interop
$ IPFS_GO_EXEC=/path IPFS_JS_EXEC=/path IPFS_JS_MODULE=/path IPFS_JS_HTTP_MODULE=/path ipfs-interop

As a custom runtime

If you want to run interop on CI against specific repo and git revision of go-ipfs or js-ipfs* then set everything up in ./scripts/custom-runtime.sh and enable it by uncommenting env: IPFS_(..) definitions in .github/workflows/test.yml

If you want to test against unrelased things locally, make sure the same env variables are set on your machine.

For example, to run pubsub tests against go-ipfs and js-ipfs revision defined in ./scripts/custom-runtime.sh, one can:

export IPFS_GO_EXEC=/tmp/go-ipfs/cmd/ipfs/ipfs
export IPFS_JS_EXEC=/tmp/js-ipfs/packages/ipfs/src/cli.js
export IPFS_JS_MODULE=/tmp/js-ipfs/packages/ipfs/dist/cjs/src/index.js
export IPFS_JS_HTTP_MODULE=/tmp/js-ipfs/packages/ipfs-http-client/dist/cjs/src/index.js
./scripts/custom-runtime.sh
node bin/ipfs-interop.js -- -t node --grep "pubsub"

Releasing a new version

This repo does not use aegir for releases. Use npm directly and publish entire root (CI in go-ipfs requires it).

npm version [major|minor|patch]
npm publish
npm push origin && npm push origin v[N.N.N]

Interop release process for when breaking changes are introduced

  1. Get branches of go-ipfs and js-ipfs working together in interop locally using environment variables to point at the local versions
  2. In this repo make a branch containing the interop changes as well as setting the go/js-ipfs commit hashes to be used by CI. Merge to master.
  3. Update go-ipfs and js-ipfs branches to use interop/master instead of whatever is released
  4. Release go and js-ipfs (not necessarily together) and after each is released (or RC'd) bump interop to use the release instead of the commit hash
  5. Release interop
  6. Bump go and js-ipfs to use released interop instead of master

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
MetaMask/IPFS-Ethereum-Hackathon: Repo for hackathon submissions发布时间:2022-06-22
下一篇:
ipfs-shipyard/ipfs-hubot: hubot for ipfs发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap