This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Test IPFS using ipfs-api with the same interface-ipfs-core tests #432
Merged
daviddias
merged 7 commits into
master
from
feat/interface-ipfs-core-over-ipfs-api-tests
Aug 25, 2016
Merged
Test IPFS using ipfs-api with the same interface-ipfs-core tests #432
daviddias
merged 7 commits into
master
from
feat/interface-ipfs-core-over-ipfs-api-tests
Aug 25, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Needs (for swarm tests): |
I want to go ahead and merge this one in, letting the @dignifiedquire would appreciate some review here. As said above, it is really great to reuse the same tests over js-ipfs-api, found a bunch of issues, this already made js-ipfs way more portable :) |
daviddias
force-pushed
the
feat/interface-ipfs-core-over-ipfs-api-tests
branch
from
August 25, 2016 06:44
6f005cd
to
168e04a
Compare
daviddias
force-pushed
the
feat/interface-ipfs-core-over-ipfs-api-tests
branch
4 times, most recently
from
August 25, 2016 07:30
257f6d0
to
1c4dec7
Compare
daviddias
force-pushed
the
feat/interface-ipfs-core-over-ipfs-api-tests
branch
from
August 25, 2016 07:30
1c4dec7
to
44dba6c
Compare
@dignifiedquire have you CR'ed this one yet? All good? |
stat: (hash, callback) => { | ||
if (typeof hash === 'string') { | ||
hash = multihash.fromB58String(hash) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a lot of duplication, would be nice to simplify this to something like this
const ensureHash = (hash) => {
if (typeof hash === 'string') return multihash.fromB58String(hash)
return hash
}
LGTM |
daviddias
force-pushed
the
feat/interface-ipfs-core-over-ipfs-api-tests
branch
from
August 25, 2016 10:39
a478c0d
to
4fce10f
Compare
MicrowaveDev
pushed a commit
to galtproject/js-ipfs
that referenced
this pull request
May 22, 2020
When running the tests I got errors like this: Error: error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak In order to fix this I created a new certificate. I thought 100 years of validity might be enough. The command to create it was (based on https://letsencrypt.org/docs/certificates-for-localhost/): openssl req -x509 -out cert.pem -keyout privkey.pem \ -newkey rsa:2048 -nodes -sha256 \ -subj '/CN=localhost' -extensions EXT -config <( \ printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") \ -days 36524 To verify, run from within *js-ipfs*: npx mocha test/core/interface.spec.js --grep 'should add from a HTTPS URL'
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO:
test-filestest-swarmNotes:
Already finding problems just by reusing test-object, this was definitely a good idea :D