Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

feat: pass extra cli args to npm test command#97

Merged
alanshaw merged 1 commit intorefactor/async-awaitfrom
refactor/async-await-and-pass-extra-args
Jan 31, 2020
Merged

feat: pass extra cli args to npm test command#97
alanshaw merged 1 commit intorefactor/async-awaitfrom
refactor/async-await-and-pass-extra-args

Conversation

@achingbrain
Copy link
Copy Markdown
Member

@achingbrain achingbrain commented Jan 31, 2020

Lets us keep env config in package.json instead of .travis.yml and do things like:

$ npm run test:interop:browser

which will then invoke a npm script like:

{
  "scripts": {
    "test:interop:browser": "IPFS_JS_MODULE=`pwd` npm run test:interop -- -t browser"
  }
}

@achingbrain achingbrain requested a review from alanshaw January 31, 2020 07:26
@achingbrain
Copy link
Copy Markdown
Member Author

Simplified interop running: ipfs/js-ipfs@acd2409

@alanshaw alanshaw merged commit ee4417b into refactor/async-await Jan 31, 2020
@alanshaw alanshaw deleted the refactor/async-await-and-pass-extra-args branch January 31, 2020 10:38
@alanshaw alanshaw restored the refactor/async-await-and-pass-extra-args branch January 31, 2020 10:38
achingbrain added a commit that referenced this pull request Feb 12, 2020
* refactor: use new async await APIs and update ipfsd-ctl

TODO:

1. [ ] fix the websocket-star tests - websocket-star was not conevrted to async/await and has a security vulnerability. Switch to using stardust or webrtc-star for the tests
1. [ ] fix ipfsd-ctl to auto kill process if it does not stop within a timeout. The previous version of ipfsd-ctl had this feature and was killing go-ipfs daemons. I've observed here and in master that go-ipfs does not quit when running tests where it sends files to/from a js-ipfs node. @Stebalien were you aware?
1. [ ] fix issue with ky never returning from a call to `res.json()` if the payload is BIG. IDK why but ky clones the response, which causes it to be piped to two places, the first is never consumed so for large responses the high water mark is hit and th stream stops flowing. It's similar to the problem we [worked around here](https://github.com/ipfs/js-ipfs-http-client/blob/d7eb0e8ffb15e207a8a6062e292a3b5babf35a9e/src/lib/error-handler.js#L12-L23).

* chore: add missing dependency

* chore: update ipfsd-ctl dep

* fix: js-ipfs bin path

* fix: really fix the ipfs path

* fix: browser tests

* fix: remove installed deps

* fix: use libp2p-webrtc-star

* test: update browser ciruit to webrtc

* chore: fix lint

* chore: update ipfsd-ctl dep

* chore: update ipfsd-ctl dep

* feat: pass extra cli args to npm test command (#97)

* fix: browser circuit tests

* chore: update ipfsd-ctl dep

* chore: install correct deps in CI

* fix: tests

* chore: add missing dep

* fix: throw if no requested address is available (#98)

* fix: throw if no requested address is available

We loop through available multiaddrs looking for certain types of
address in our tests.  If there are non of the type we are looking
for, we don't return anything which results in undescriptive
error messages from libp2p.

The change here is to throw an error with an explicit message if,
for example, no webrtc-star address is available when we expect
there to be.

* chore: pr comments

Co-Authored-By: Alan Shaw <alan.shaw@protocol.ai>

* chore: use ipfs@0.41.0-rc.0 and ipfs-http-client@42.0.0

* chore: update readable-stream-buffer-stream dep

* chore: add go-ipfs, js-ipfs and js-ipfs-http-client to devDeps

* chore: update ipfs dep

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Alex Potsides <alex@achingbrain.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants