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

fix: throw if no requested address is available#98

Merged
alanshaw merged 2 commits intorefactor/async-awaitfrom
refactor/throw-if-no-address-found
Feb 4, 2020
Merged

fix: throw if no requested address is available#98
alanshaw merged 2 commits intorefactor/async-awaitfrom
refactor/throw-if-no-address-found

Conversation

@achingbrain
Copy link
Copy Markdown
Member

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.

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.
@achingbrain achingbrain requested a review from alanshaw February 4, 2020 12:08
Co-Authored-By: Alan Shaw <alan.shaw@protocol.ai>
@alanshaw alanshaw merged commit 51814aa into refactor/async-await Feb 4, 2020
@alanshaw alanshaw deleted the refactor/throw-if-no-address-found branch February 4, 2020 13:07
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